hai.......
i want to access contact_list from the the phone , any one can help access pim api in 60 series phones.........
plz send any code regardin accessing pim api for 60 series phones......
regards.......
hai.......
i want to access contact_list from the the phone , any one can help access pim api in 60 series phones.........
plz send any code regardin accessing pim api for 60 series phones......
regards.......
First of all, does you phone support PIM API. It was added in S60 2nd Edition FP2.
For guidance, see this document
http://www.forum.nokia.com/info/sw.n..._0_en.zip.html
Hartti
How about Nokia 2228
is it also supported?
Thanks
Hi,
What you are exactly you are looking for..is done by JSR 75..known as PIM api an optional package..ok..here it is ..
http://developers.sun.com/mobility/a...pim/index.html
With which device you are working with..you can check that whether your device support the same.
http://www.forum.nokia.com/devices/matrix_all_1.html
the perfect code is here -
http://wiki.forum.nokia.com/index.ph...s_using_JSR_75
Thanks,
Thanks with Regards,
R a j - The K e r n e l
Join Delhi-NCR Nokia Developer's Community,
Hi,
If you not read the API then go to the links provided by Rajand go through it. Its easy and one more thing first of all check in device specifications whether your handset supports it or not.
By the way you will not be able to access the contacts stored in SIM card using PIM api.
Sunil
Mobile Application Developer
netsurvival, I am not familiar with that phone, so I cannot answer
sunil, S60 phones PIM API does not support accessing SIM contacts. On Series 40 phones this is possible.
Hartti
Hi,
Hartti, Are you saying that one can access SIM card contacts using PIM API on S40 phones. I have tested on nokia 5310 XpressMusic but it didnt showed any contacts of the SIM card.
If I am not wrong you are saying about using SATSA API. I have read that but not used it yet.
Anyways thanks Hartti.
Sunil
Mobile Application Developer
The SIM contact list is separate from the contact list on the phone memory. Have you checked the supported contact lists on the phone with listPIMlists?
Unfortunately I do not have a source code example available.
Hartti
Last edited by hartti; 2008-11-25 at 00:42. Reason: typo
try this may be it work
import java.util.Enumeration;
import java.util.Vector;
import javax.microedition.pim.Contact;
import javax.microedition.pim.ContactList;
import javax.microedition.pim.PIM;
public class Pim {
static PIM pim = PIM.getInstance();
static ContactList contactList;
public static Vector getContact() {
Vector vector=new Vector();
try {
contactList = (ContactList) pim.openPIMList(PIM.CONTACT_LIST,
PIM.READ_WRITE);
Enumeration contacts = contactList.items();
while (contacts.hasMoreElements()) {
Contact c = (Contact) contacts.nextElement();
String home = c.getString(Contact.TEL,0);
String name = c.getString(Contact.FORMATTED_NAME, 0);
vector.addElement(home + "-" + name);
}
// int phoneNumbers = c.countValues(Contact.TEL);
// System.out.println("Pim.getContact()" + phoneNumbers);
// string = new String[phoneNumbers];
} catch (Exception e) {
}
return vector;
}
}
Anshu Chauhan
J2me Developer