Problem in getting number of Mobile Contact list

Hello

I write the code for the number of cell phone contacts list. But if there are two number (phone number, mobile phone number) in a single contact, then I'm unable and differentiate.

BlackBerryContactList contacts = null;
        try {
            PIM pim = PIM.getInstance();
            contacts = (BlackBerryContactList) pim.openPIMList(PIM.CONTACT_LIST, PIM.READ_ONLY);
            PIMItem item = contacts.choose();
            if (item == null || !(item instanceof Contact)) {
                return;
            }

BlackBerryContact contact = (BlackBerryContact) item;

            int nTelNoCount = contact.countValues(BlackBerryContact.TEL);

            for (int i = 0; i < nTelNoCount; ++i)

            {

                int telAttrs = contact.getAttributes(BlackBerryContact.TEL, i);

                if ((telAttrs & BlackBerryContact.TEL) != 0 || contacts.isSupportedField(BlackBerryContact.ATTR_MOBILE)) {

                    String str;
                    Logger.out(m_strClassName,"---------3");
                    str = textbox.getText().trim();
                    if (str.equals(""))

                    {

                        String strMob = contact.getString(BlackBerryContact.TEL, i).trim();

                        Logger.out("InviteFriendScreen", "----------------strMo" + strMob + "--len--" + strMob.length() + "---" + strMob);

                        textbox.setText(strMob);

                    }

                    else if (str.indexOf((contact.getString(BlackBerryContact.TEL, i))) != -1)

                    {

                        Dialog.alert(Constants.ALERT_ENTER_DIFFERENT_NUMBER);

                    }
                    else

                    {
                        String addContact = contact.getString(BlackBerryContact.TEL, i);
                        Logger.out(m_strClassName,"---------4");
                        if (str.indexOf(addContact) == -1)

                        {
                            Logger.out(m_strClassName,"---------5");
                            textbox.setText(str + "," + addContact);
                        }
                    }

                    break;

//              } else {
//
//                  Dialog.alert(Constants.ALERT_ADD_ONLY_MOBILE_NUMBER);
                }

            }

        }
        catch (PIMException e)
        {

        }
        try

        {
            Logger.out(m_strClassName,"---------7");
            contacts.close();

        }

        catch (PIMException e)

        {
            Logger.out(m_strClassName,"---------8");
            e.printStackTrace();

        }
    }

Now here when I added only the contact number of work and is not added and showing an alert (add only Mobile number). But if a person has mobile number and contact number of work, then that's all first showing the alert and then adding the mobile number.

How can I solve this problem?

Yes, I solve it...

Tags: BlackBerry Developers

Similar Questions

  • BlackBerry Smartphones Black Berry Bold 9900 only able to ring if number in phone contact list

    Black Berry Bold 9900 only able to ring if number in phone contact list

    can someone help me solve the problem above his on optus and has just the stock of claims on this subject.

    Would appreciate any assistance.

    Perfect phone in all other respects.

    Hello and welcome to the community!

    I recommend that you try to start safe mode:

    • KB17877 How to start a smartphone BlackBerry in Mode safe

    It will take several attempts to get the combination of keys ESC (press/release/hold) OK, so be patient. When properly in Safe Mode, see what happens.

    If the behavior continues, then well... think what happened just before this behavior started? A new application? An update? A theme? Something else? Think carefully that the slightest change can be causal... and try to undo all that was.

    But if the behavior continues mode without failure, you may need to consider more drastic measures - WIPE, OS Reload, BBSAK Wipe/Reload and the process of reloading OS 'skeleton '. To prepare, you should be sure that you have a full backup of your PC... Please see the Backup link in my sig auto on this post for instructions.

    You may also use these tips:

    Good luck and let us know!

  • Problems of Smartphones blackBerry removal from contact list

    Hello!

    I have problems removal from contact list; some contacts appear updated externally and cannot be removed; do you know what to do in this case?

    Thank you and best regards...

    Hi all!

    I found a solution to this question in a message posted on 01/09/2009 19:54

    Re: Need help to clear sensitive information

  • Contact of Smartphones Corrupt blackBerry causing problems with the rest of the contact list

    Hello
    Tried to use the search, but I got nothing helped.

    I have a corrupted contact that I can not remove or change. This contact is about 25 in my list of 567 and accordingly, all the apps that need to access the list of contacts do not work, as they cannot read beyond this corrupted contact. Vlingo Yes, WhatsApp, etc.. Do not work properly.

    Someone has an idea of what I can do to fix this?

    Well, problem solved, with the help of the @blackberryhelp team. The team has accompanied me through a fresh re-installation of DM, which allowed me to finally sync with Outlook. However, what really solves the problem has roll me back pour.337 that magically gave me back my contacts. I then wiped the device (after saving everything, of course) and re-installed. 448 and PRESTO! all my contacts were there and accessible to the operating system once more. Long and frustrating road, but at least with a satisfactory ending.

  • BlackBerry smartphones can't save a phone number on my contact list on my 8520

    Hello

    My Blackberry 8520 refuses to add contacts on my touch and freeze when I insist. What should I do?

    Thank you

    Trey

    If you have recently updated the removing applications (windows live, yahoo messenger, gtalk) IM these and restart your phone - there is a problem with the recent updates.

  • BlackBerry smartphones can not call numbers from contact list?

    Hi, I have a blackberry curve 8350 and for some reason whenever I try to call a number in my contacts list, it indicates the code or number I dialed is incorrect, and please try again.

    I know that the number is just because they can call me very well, if I dial the number calling me, but when I try to do from the list of contacts it just won't let me.  Its a problem because I don't remember hundreds if the number I have stored.

    I noticed that when my phone is to dial the number, it always puts a sign before the number as his try dialing international or something.  For example I want to call 216-478-9876, but my phone dial + 216-478-9876.

    I'm so lost, and any useful information would be greatly appreciated!

    Thank you

    Welcome to the Bennie06 forums

    I think it has to do with your smart dial settings. In the list of phone go to menu > Options > Smart Dialing. Make sure your country code is + 1 if you are in the USA/Canada. I think it will work. If this isn't the case, post back with the settings were there.

  • Compromise recovery contact list

    My original email password has been compromised, so I tried to change the password.  have tried the other combos since and the password the2nd lost in the maze.  Any ideas how I can get back my original contacts list?

    Hello

    Answers is a peer group supported and unfortunately has no real influence on Hotmail
    or Windows Live Mail.

    HotMail has its own Forums, so you can ask your questions there.

    Windows Live Solution Center - HotMail - HotMail Forums Solutions
    http://windowslivehelp.com/

    Hotmail - Forums
    http://windowslivehelp.com/forums.aspx?ProductID=1

    Hotmail - Solutions
    http://windowslivehelp.com/solutions.aspx?ProductID=1

    How to contact Windows Live Hotmail Support
    http://email.about.com/od/hotmailtips/Qt/et_hotmail_supp.htm

    Windows Live Hotmail Top issues and Support information
    http://support.Microsoft.com/kb/316659/en-us

    Compromised account - access unauthorized account - how to recover your account
    http://windowslivehelp.com/solution.aspx?SolutionID=6ea0c7b3-1473-4176-b03f-145b951dcb41

    Hotmail hacked? Take these steps
    http://blogs.msdn.com/b/securitytipstalk/archive/2010/07/07/Hotmail-hacked-take-these-steps.aspx

    ---------------

    Windows LiveMail has its own Forums, so you can ask your questions there.

    Windows Live Mail - Forums
    http://windowslivehelp.com/forums.aspx?ProductID=15

    Windows Live Solution Center - Solutions mail - Mail Forums
    http://windowslivehelp.com/

    Windows Live Mail - mail Solutions
    http://windowslivehelp.com/solutions.aspx?ProductID=15

    I hope this helps.

  • problem with recovery of contact in the contacts list

    Hi guys, I wrote an application that opens the address book, and the user has the option to choose a contact. the problem is, im able to select a contact as long as the contact has an email or an identification number. If the contact desnt have people so I can't contact information. Instead, it shows the contact details. Heres my code: private void showAddressBook() {try {BlackBerryContactList contacts = (BlackBerryContactList) BlackBerryPIM.getInstance () .openPIMList (BlackBerryPIM.CONTACT_LIST, BlackBerryPIM.READ_WRITE);}} Contact BlackBerryContact = (BlackBerryContact) contacts.choose (null, BlackBerryContactList.AddressTypes.PIN, false); Portable chain = ""; int numValues = 0; numValues = contact.countValues (BlackBerryContact.TEL); for (int i = 0; i numValues; i ++) {if (contact.getAttributes (BlackBerryContact.TEL, i) == BlackBerryContact.ATTR_MOBILE) {cell = contact.getString (BlackBerryContact.TEL, i); break ;}} //phoneNumber is a (mobileNumber) phoneNumber.setText of BasicEditField;}} } catch (PIMException ex) {ex.printStackTrace () ;}} do I have to do is: 1. open the address book 2. Click on a contact 3. set the number of mobile phone to a BasicEditField. any help appreciated

    I am not able to read your code not formatted, but I would suggest that you use the method to choose without parameters.

    List of BlackBerryContactList = (BlackBerryContactList) PIM.getInstance () .openPIMList (PIM. CONTACT_LIST, PIM. READ_WRITE);
    blackberryContact = list.choose () (BlackBerryContact);
    List.Close ();

  • Since last week, I had a problem loading my Hotmail contact list addresses in the bar 'To '. It does not occur in Internet Explorer

    Problem with Hotmail. Usually when I start typing an address that is in my contact list, he fills automatically. Now I just get a circle going round and round. If I go to my contact list and select the address and click 'send email' will initially, it disappears in a second or two. To send a message, I have to enter the entire e-mail address in the field "to". This problem started about a week or two ago and doesn't happen when I connect to Hotmail using Internet Explorer.

    It left me speechless. Still the same problem. I noticed that sometimes the auto-fill starts working for a few seconds, then I get the spinning wheel.
    I will try to spend some time on it this weekend.

  • by clicking on to does not contact list, one of the many problems

    I have several problems with Hotmail. I think that my Hotmail is damaged, or crazy.

    When I click on the button 'To', nothing happens.

    When I start typing an e-mail address in the 'TO' bar, not auto-fill or suggest entries. Even if I type the whole e-mail address, nothing comes up.

    What is happening with the addresses I've used hundreds of times.  My contact list is intact.

    When I click on "REPLY" a blank e-mail opens instead of a pre addressed to the sender, I answer to...

    I get frequent messages in the lower-left corner of the screen saying "Done with errors on page", but no explanation or indication of the error.

    I ran the 'how to optimize Internet Explorer' fix - it, with little or no change. Any change seems to be only temporary.

    Hotmail often take 15 to 30 seconds to "load" (I know it is "loading" because that's what it says near the lower left corner of the screen), displaying messages in the lower-left corner of all things there download, but above all, nothing seems to happen.  Sometimes when I opened an e-mail, it will go through the phase of "loading" for a few seconds and then revert back to where it was before I clicked on the message to open it.

    I frequently receive messages that 'we cannot connect to Hotmail right now, please try again later' even when I send anything. My internet connection is not interrupted and my Tx and Rx speeds are good.

    I am running XP with all the service packs and other updates, have masses of memory, IE 8.0.6001.18702

    Hello FredHowe,

    The best place to ask your question of Windows Live is inside Windows Live help forums. Experts specialize in all things, Windows Live, and would be delighted to help you with your questions. Please choose a product below to be redirected to the appropriate community:

    Windows Live Mail

    Windows Live Hotmail

    Windows Live Messenger

    Looking for a different product to Windows Live? Visit the home page Windows Live Help for the complete list of Windows Live forums to www.windowslivehelp.com.

  • In Windows Mail, when I want to create an email, then click on the "to:" I do not get my list of contacts with folders, I have just the button get a long list of all the contacts in my contact list.

    I'm having a problem with Windows Mail.  I have Vista.  When I want to create an email and find people to send to, then click on the "to:" I do not receive my contacts with folders list, I have just the button get a long list of all the contacts in my contact list and no folder where to choose from... and MANY of them are repeated 2 or 3 times.  It takes me forever to browse all of the names to find the little that I could transmit or write.    I tried to delete properties, but they simply duplicate himself instead of delete.  Since the contacts button, it's how I organized them... but there is no contact on the "create mail" window button click to access my files organized.  Can anyone help?

    original title: problem with Windows Mail

    Hello

    I suggest that you check the troubleshooting provided by S of Halima steps and check if they help to resolve the issue.

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-windows_programs/i-have-Vista-and-Windows-mail-i-cant-create-a/ace23d91-5d55-4AC7-8ca1-75aa5d53fb20

  • On my contact list when I send something appears a sentence at the bottom of my list. It is said Horney girl here? How did get there and how to do if turned off.

    This sentence is the last thing on my list of contacts and appears only when I use the contacts list to send an email.

    I don't know how to remove and how it get there in the first place.  I can delete it at the time, however, it

    y at - it next time.  I can't click on it and there is no address attached.

    Can you help me?  IT IS SAID HORNEY GIRL HERE

    BEA Harrison

    Hello

    you say not what e-mail program, you use

    you use Hotmail?

    I'm sorry, but we cannot help with hotmail problems in these forums in response to vista

    Please repost your question in hotmail in the hotmail link below forums

    http://windowslivehelp.com/product.aspx?ProductID=1

  • My whole Outlook contacts list has been deleted (I had nothing to do with it) when I go on 'people' all I get is the wheel of the cart when I insist on the 'device' same thing!

    My whole Outlook contacts list has been deleted (I had nothing to do with it) when I go on 'people' all I get is the wheel of the cart when I insist on the 'device' same thing!

    Hi Chevelon,

    1. How do you navigate Outlook.com?
    2. using Internet Explorer or another web browser?
    3. If you are using Internet Explorer, version of Internet Explorer you are using?
     
    Try to optimize Internet Explorer
     
    How to optimize Internet Explorer
     

    Note: The feature reset the Internet Explorer settings can reset security settings or privacy settings that you have added to the list of Trusted Sites. Reset the Internet Explorer settings can also reset parental control settings. We recommend that you note these sites before you use the reset Internet Explorer settings.

     
    If the problem is still not resolved, please post the request to the Forum Windows live:
     
    Microsoft, Outlook.com, SkyDrive account
     
    Please report if you need help. We will be happy to help you further.
     
     
     
  • I need to access my account to get my hotmail contact list

    I need to get my contact list from my hotmail account that has been closed and then checked that I am the owner of the account.  However, who doesn't let me on my hotmail account because I don't remember the secret question.  What should I do next?

    Your question is a Hotmail account. Please see Solutions to common problems of account Hotmail:
     
    If no help there, post your question in the forum of Hotmail account questions:
     
    When you post here, be sure to include the e-mail address of the account that has the problem, so the moderators can look into it.
     
     
    "stormiee" wrote in the new message: * e-mail address is removed from the privacy... *
    I need to get my contact list from my hotmail account that has been closed and then checked that I am the owner of the account.  However, who doesn't let me on my hotmail account because I don't remember the secret question.  What should I do next?

    Gary van, Microsoft MVP (Mail)

  • In bulk API 2.0/1.0 get contact lists the url parameters don't work

    Hello

    I'm testing the different parameters of the URL as shown here: http://docs.oracle.com/cloud/latest/marketingcs_gs/OMCBB/index.html#D_Reference/endpoints/contacts/get-lists.htm%3FTocPa... and none of them does not seem to work.

    I tried a simple request by adding the limit: / contacts/lists? limit = 1 but he still returned the default value of 1000 in the response.  It is the same for the other parameters.  The paper says this is in bulk API 2.0 but by changing the url of the results of version 1.0 to 2.0 in 404 in the query.

    Any idea what is the problem?

    Thank you

    For bulk 1.0, please try: /api/bulk/1.0/contact/lists?pagesize=1

    For bulk 2.0, please try: /api/bulk/2.0/contacts/lists?limit=1

    Endpoints were made plural in bulk 2.0, in addition to changes to parameter.

    Re: your second question, the best source for contacts lists is api/bulk/2.0/contacts/lists.  The bulk and the rest for the api will provide the data, but in bulk API 2.0 will not change while the REST 2.0 may (without prior notice).

Maybe you are looking for