如何访问黑莓手机中的SIM卡联系人

编程入门 行业动态 更新时间:2024-10-24 09:24:45
本文介绍了如何访问黑莓手机中的SIM卡联系人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我需要访问黑莓的联系人列表,我下面令状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卡联系人

本文发布于:2023-11-28 06:43:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1641342.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:机中   联系人   黑莓   SIM

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!