我需要访问黑莓的联系人列表,我下面令状code要做到这一点:
I need to access contact list in blackberry, I writ following code to do that:
private void readContacts() { try { PIM pim; pim = PIM.getInstance(); String lists[] = pim.listPIMLists(PIM.CONTACT_LIST); for (int i = 0; i < lists.length ; i++) { clist = (ContactList) pim.openPIMList(PIM.CONTACT_LIST, PIM.READ_ONLY, lists[i]); Enumeration cenum = clist.items(); while (cenum.hasMoreElements()) { Contact c = (Contact) cenum.nextElement(); ContactDTO contact = new ContactDTO(); parseContactInfo(c, contact); contacts.addElement(contact); } clist.close(); } } catch (Exception e) { } }在J2ME这个code访问都SIM卡和手机中的联系人,但在黑莓它是只访问手机通讯录。
In j2me this code access both sim and phone contacts but in blackberry it is accessing only phone contacts.
String lists[] = pim.listPIMLists(PIM.CONTACT_LIST);lists.length 收益1
我怎么能在黑莓手机访问SIM卡联系人?先谢谢了。
How I can access sim contacts in blackberry?? Thanks in advance.
推荐答案据此帖来自西蒙海恩,你不能
您不能访问从SIM卡联系人AFAIK。从触头 通讯录可以与PIM API访问,请检查 www.blackberry/developers/docs/6.0.0api/net/rim/blackberry/api/pdap/BlackBerryContactList.html
you cannot access contacts from the sim card afaik. contacts from the addressbook can be accessed with the PIM API, check www.blackberry/developers/docs/6.0.0api/net/rim/blackberry/api/pdap/BlackBerryContactList.html
这答案是大约OS 6.0,所以也许东西,我不知道在OS 7得到补充的(?)
That answer was circa OS 6.0, so perhaps something that I'm not aware of got added in OS 7 (?)
更多推荐
如何访问黑莓手机中的SIM卡联系人
发布评论