I am facing problem with contact list.
The problem is that i have created a application in which i read all the contact in the phone. if the contact list is small i.e. upto 20 no. it works fine. But if the no. of contact is more, then it goes to heap memory, since i have to load all the contact to display.
The solution for these can be, load 10 contact at a time and during the down key press after reaching the 10th contact reload the next 10 contact. And during Up key press vice-versa.
But i don't find solution for these enumation, as each time the enumation starts from first and i don't find any method where i can specify the start point of enumation. so can any help me for these? or do any one have some other alternative method. if yes then please let me know.
Here is the sample code i am using
String conListName = PIM.getInstance().listPIMLists(PIM.CONTACT_LIST);
ContactList contacts = (ContactList) (PIM.getInstance().openPIMList(PIM.
CONTACT_LIST, PIM.READ_WRITE, conListName));
Enumeration e = contacts.items();
Contact cc = (Contact) e.nextElement();
if (cc.countValues(Contact.TEL) > 0)