Contacts missing in my listfield list:

Hello

I'm trying to read and the list of all the contacts in my application listfield. I use the following code to it:

PIMList pList = null;

try
        {
            pList = PIM.getInstance().openPIMList(PIM.CONTACT_LIST, PIM.READ_ONLY);
            Enumeration enumList = pList.items();
            while(enumList.hasMoreElements())
            {
                StringBuffer sb = new StringBuffer();
                Contact contact = (Contact)enumList.nextElement();
                String[] dataArray = contact.getStringArray(Contact.NAME, 0);
                String data;
                boolean bFlag = false;

                data = dataArray[Contact.NAME_GIVEN];
                if ( data==null )
                {
                    data = dataArray[Contact.ORG];
                }
                if ( data!=null )
                {
                     int n = _lst.getSize();
               // Inserting into list view
                    _lst.insert(n);
                    _callback.insert(data, n);
                }
  }

}catch (Exception e)
        {
            System.out.println("*********** Exception 1 ***********");
        }
        finally
        {
            if(pList !=null)
            {
                try
                {
                    pList.close();
                }
                catch (Exception e)
                {
                    System.out.println("*********** Exception 2 ***********");
                }
            }
        }
private static class ListCallback implements ListFieldCallback
    {
        private Vector listElements = new Vector();

        public void drawListRow(ListField list, Graphics g, int index, int y, int w)
        {
            String text = (String)listElements.elementAt(index);
            g.drawText(text, 0, y, 0, w);
        }

        public Object get(ListField list, int index)
        {
            return listElements.elementAt(index);
        }

        public int indexOfList(ListField list, String p, int s)
        {
            //return listElements.getSelectedIndex();
            return listElements.indexOf(p, s);
        }

        public int getPreferredWidth(ListField list)
        {
            return Graphics.getScreenWidth();
        }

        public void insert(String toInsert, int index)
        {
            listElements.insertElementAt(toInsert, index);
        }

        public void erase()
        {
            listElements.removeAllElements();
        }
    }

But the problem is, he is adding contacts to my opinion listfield. But not all contacts. For example, I have over 200 contacts from A to Z. But my opinion list gets only up to C contacts (I get only about 50 contacts), missed other contacts. What's not here? Please advise to solve this problem.

I tested the BB Storm2 5.0 device.

Thank you.

I got a link:

http://supportforums.BlackBerry.com/T5/Java-development/access-address-book-contacts/Ta-p/445045

that solved my problem.

Thank you.

Tags: BlackBerry Developers

Similar Questions

  • How to remove a contact from the drop-down list?

    How to remove a contact when, if forwarding a message, the icon flashes in space 'To' to enter the email address, when you press the first letter of a recipient, it displays a list of previous names/addresses used. This can add to a huge list! Most of the time, it is useful, but how can I shorten the list by removing unwanted contacts in the drop-down list? I got them removed from my address book/contacts (and they are deleted) but even after re-booting the computer, their names still appear in the drop-down list as before. All solutions?

    Instead of typing the first letter of the name of the recipient

    Press on the envelope icon to next to the box where you type the name of the recipient

    Opens the selection of recipients

    Highlight the recipient of choice

    Click on the button to

    The name appears in the window of the recipient of the Message

    Windows CC and British Colombia should remain virgins

    Press Ok

    The name of recipients appears in the field to the message

  • Unknown contact appeared on t. o. list of contacts, but not on my list of regular contacts - I can't delete

    Unknown contact appeared on t. o. list of contacts, but not on my list of regular contacts - I can't delete

    original title: unknown contact on list o. t.
    Thanks for visiting the site of the community of Microsoft Windows. The question you posted would be better suited to the Windows Live community. Please visit the link below to find a community that will provide the support you want.
    http://windowslivehelp.com/forums.aspx?ProductID=1
  • How can I move my contacts from "Windows Mail" app list in Vista to Windows Live Hotmail online? I can't find the Contacts file to download.

    How can I move my contacts from "Windows Mail" app list in Vista to Windows Live Hotmail online? I can't find the Contacts file to download. Why is it so difficult?

    Hi JohnKoelling,

    When you use Windows Live Hotmail and the question you have posted is related to Windows Live, so it would be better suited in the Windows Live community. Please visit the link below to find a community that will provide the best support.

    Windows Live Solution Center Hotmail Portal

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

     

    I hope this helps.

  • (64-bit) Windows 7 programs missing in uninstall a list of programs.

    Hello

    My grandson likes to play internet games and download a number of them from time to time, and as usual, it let me uninstall a lot of Add-ons and other types of files unwanted. Toolbars vius protections, etc. You name it... and it is discharged by yours truly.

    I had stopped it for a long time, but allowed him to download a more "Wizards 101" a few days back, and our pc acted super slow, gel etc... since.

    So I just deleted several unwanted files in the Department "uninstall programs" and once it was finished, I had to change to another account momentarliy... but when I got home, I checked again to make sure that everything was ok, I found only 14 programs listed.

    The list is always another long (a full-page scroll down) and almost every major program, I have the list.

    I check every other account I have and it's the same on everyone.

    I was very careful to uninstall any other files juck, and I have therefore absolutely no indication as to what is happening here. All my programs seem to work ok, so far anyway, except for the missing information in uninstall list programs.

    I ran full analyses of the virus system (only for seven tracking cookies) and tried all the usual methods of maintinace I don't know.

    This got me stumpped. If anyone knows a thing or two about this kind of problem, I'd appreciate some advice.

    And would like also some tips for my grandson who reads this as well. Him and me have always disagreed on the dangers of downloading games on the internet and it was just someone else might believe next to his grandfather. (lol)

    Any notice will be really appreciated.

    My desktop is HP Pavilion slimline

    MOD s5503w

    OS = windows 7 Home Edition (64-bit)

    service pack 1

    Boramfan87, welcome to the forum.

    You are absolutely right about the dangers of downloading games and other programs on the Internet.  In fact, I gave up downloading FREE programs.  If I do so, however, I use the custom installation option.  This allows me to check to see if all unwanted programs are added to my computer without my knowledge.  It happens all the time.

    Now to get tips for you, Grandpa.  You can create an account for your grandson.  This will allow you to set Parental controls to keep certain types of programs to be added to your computer: control panel / user accounts / manage another account / set up Parental controls.  In addition, you can protect your account by adding a password.  Just make sure that you note somewhere if you can remember it.  It will be embarrassing when you have to say grandson that you forgot your password created to keep him out of your business.

    It seems to me you may have inadvertently selected programs and deleted.  I can't think of anyway to make programs disappear from the "uninstall or change a program", otherwise.  You will have to reinstall any missing programs.

    Please, click on "Thumbs Up +" if I helped you and click "Accept as Solution" If your problem is resolved.

  • How to make the decrement on listField list?

    IM create code like this:

    public class ScreenList extends MainScreen implements ListFieldCallback{
        String x[];
        ListField list;
        public ScreenList(){
            String arr[] ={"1", "2","3","4","5","6"};
            list = new ListField();
    
            int length = arr.length;
            x = new String[ length];
            for(int i=length-1; i>=0; i--){
                x[i]=arr[i];
                //add(new LabelField(arr[i]);
            }
            list.setSize(length);
            list.setCallback(this);
            this.add(list);
        }
    
        public void drawListRow(ListField arg0, Graphics arg1, int index, int y,
                int width) {
            // TODO Auto-generated method stub
            arg1.drawText(x[index], 0, y);
    
        }
    

    If I always try on Simulator Simulator print 1,2,3,4,5,6, but if I try to print to new Label 6,5,4,3,2,1 result

    My question... How to make the decrement with listField list implements reminder? Thanks in advance...

    Oops sorry correction instead of length use length - 1

  • I used the functionality of bookmark successfully for some time, however, just reciently I can't locate the function 'organize bookmarks '. It seems to be missing from the usual list of options.

    Have been using Firefox Bookmarks for awhile. Just noticed recently when I open the bookmarks that everything is there except the option to 'Organize Favorites '. I tried to rename a folder, but two names - organize bookmarks is missing from the top of the list.
    Is this good, unusual or the result of a virus or what?
    Should I reinstall Foxfire. I don't want to lose all the files.
    Appreciate any advice. THX

    In the Firefox Orange button > bookmarks > show all bookmarks > organize etc.

  • Contact the sending of the list

    I used to be able to send an email by clicking on to: who brought to the top of my list of contacts in gmail. Then I just clicked on all the names I wanted to send it to and he's appeared in the mailing list. But he works currently for the first email that I send, if I try to click on to: on another message, I want to send to people in my contacts list, it will give the list of all names in my contact list, I will then select but when I chose them he simply will not be and jumps back to the contact list and it's erased. I must then make typing has, or b or c or what ever, it is very time consuming and I hate it, it's happened in the last month or two. Is there something wrong with the settings or gmail

    If you use an email client such as Outlook Express, Windows Mail, Windows Live Mail, etc., we may be able to help.
     
    If you are just using Gmail through your browser, you should ask in a forum of Gmail.
     
     
  • How contact obtained in the mailing list, but no contact list so it can be removed

    How room sexy chick get in the contact list send and how to remove them from the contact list send when not on the list of regular contacts

    This also happened to me with the House of hot chick and other similar names somehow appearing in my Hotmail drop-down 'To' list of contacts when you compose a new message. The names do not appear in the list of regular contacts that you get when you click on Contacts. If you can not select and remove contacts from the scam. I need to know how to remove these offensive contacts. They can get in the list by accidentally open some spam messages when you try to remove them.

    You have provided your e-mail program, so I can tell you to ask the experts of Hotmail Hotmail Forum. Never use Hotmail, I wouldn't have a clue.

    Windows Live Solution Center Hotmail Forum
    http://windowslivehelp.com/forums.aspx?ProductID=1

  • Contacts missing email when trying to add them while composing mail.

    Original title: Email Contacts.

    When I compose an email and check the "link" to display the pop - up to find my contacts by email, it says no contacts. Yet, I have a lot of names in my contact list.

    Hello

    Email client : the e-mail program installed on your computer.

    For example: Microsoft Office Outlook, Windows Mail, Windows Live Mail, Outlook Express, etc.

    Means of webmail , online messaging program.

    For example: Yahoo mail, Hotmail, etc.

    To restore e-mail from yahoo contacts, contact yahoo support team. You can also post your request in their forum.

    Yahoo support: http://help.yahoo.com/l/us/yahoo/helpcentral/

    Kind regards.

  • Cannot run microsoft outlook; message says use Inbox Repair tool (scanpst.exe) how can I do? In addition, how to restore windows media player; the program name is missing from the selection list.

    Message says:

    C:\users\deaconmike\appdata\local\MicrosoftOutlook\Outlook.pst

    Quit Outlook and all mail inabled applications, then use the repair tool Inbox (scanpst.exe) to diagnose and repair errors in the file.  For more informaion about the Inbox Repair tool, see Help.

    Hello

    1. from which the program (Windows Media Player) selection list is missing?
    2 have you checked in the Windows features?

    I suggest that you follow the steps mentioned below.

    Step 1:

    Check if Windows Media Player is disabled in Windows Features.

    http://Windows.Microsoft.com/en-us/Windows-Vista/turn-Windows-features-on-or-off

    Step 2:

    I suggest that you run SFC scan on your machine to verify if this is related to missing or damaged system files.

    As regarding problems with Outlook, I you should post the question in the forums of Outlook.

  • Problems with the registration of Contacts to the allowed senders list.

    Lately, I've seen on this forum where people are struggling to save the contacts to their list of senders allowed to ePrint Center. The problem has been described as one edits the list or it creates for the first time, adds their contact email address, and then it disappears and none of the contacts have been saved.

    Here is the workaround I would use adding and registering on the list of senders allowed in ePrint Center. I had people report success using this method. I hope it helps.

    1. connect to ePrint Center

    2. click on the senders list and add the user as usual.

    3. click on the Save icon after adding the address - do not sign of ePrint Center.

    4. then send an email to the printer from this sender you just added.

    5. once the e-mail has been received by the printer disconnect and then come back in ePrint center and check the list of senders.

    I hope this helps the community!

  • BlackBerry Smartphones not successfully added BB Messenger contacts / phone numbers unlisted / calls list

    Hello! I went from Cruve from BB to BB "BOLD" this weekend and while I tried to add some of my contacts from MSN messenger on my new "BOLD" of BB BB, some of them appear as accepted invitation, but instead of their name, their ID number is displayed. Whenever I send them messeges they they receive that way.

    What can I do?

    Also, I added some of my phone numbers and when I received a call from some of them, their number appeared instead of their names, as if they weren't part of my address book.

    Finally, my calls list does not appear in chronological order...

    Help!

    Thnks

    Hi michron and welcome to the BlackBerry Forums

    Most important here is the following, you have the old blackberry with you?, if your answer is Yes, follow this procedure.

    1 - Clean your BlackBerry "BOLD", go to menu, options, security options, press menu again and wipe of the handheld.

    2 connect the old BlackBerry to BlackBerry Desktop Manager and choose the Option of switch device, program read all the information on your device, after that this request automatically to connect the new BlackBerry "BOLD" and automatically adds information about the new device, no more action.

    Included that all contacts in BlackBerry messenger production inserted to the new device.

  • Whenever I have delete a contact duplicate in the alphabetical list, he jumps at the beginning again at "A".

    Original title: address book

    I'm trying to delete a lot of contacts in the address book [that each of them has been accidentally added twice!] and whenever I have remove it in the alphabetical list, he jumps at the beginning again at "A".      Anyway I can't around that?

    Hello

    Currently there is no way to delete multiple contacts of persons App

    Open the charms > settings > Feedback

    Request the feature to improve the application

    Open your account, Hotmail or Outlook to delete several contacts.

  • HR HTML: Missing file in topic list Pod

    I'm working in HR HTML with a colleague on stations work separate, but using a CMS. Basically, extract us all the HR files in a local folder and archive them in the CMS for storage/backup.

    My colleague has changed a name of topic (with its HTML file name) in HR (via the Properties section) and transferred to the CMS. When I downloaded the file (with the new file name) of the MSC in my local HR folder, the following occurred when I tried to insert a link from another topic on the (new) subject:

    (1) the Hyperlink dialog box still had the old name of topic, but when I clicked on the preview pane is empty.

    (2) the new topic seemed quite in the Hyperlink dialog box or the pod of the list of topics.

    I imported the file/subject using file > import, which solved the problem. But I recall a file that uses HR to manage topics. I think you can remove it and HR it generate automatically when you open a project. Anyone know the name of the file?

    Thank you.

    There is the PCD file, which is a temporary database with information on the project. This includes a list of topics. The list of topics is stored in the *.fpj file in your project directory. If a topic is missing, but all the links are still there, one of the *.fpj files has been corrupted.

    "I have a free script that can rebuild the files *.fpj for whenever that happens: HelpEssentials ' lack of subjects Fixer

Maybe you are looking for