Can you access sim contacts from J2ME?

萝らか妹 提交于 2019-12-11 05:21:59

问题


Hi I am developing a mobile application where I need to access the phonebook of the users, SIM and phone contacts.

Is this possible?


回答1:


Depends on the handset, some only let you access phone contacts, some do both phone and sim. Make sure you iterate over all the PIMLists supplied by PIM.listPIMLists(), often this method returns two lists, one of which will be phone, the other will be sim.




回答2:


Yeah its possible. Look on this discussion on Nokia forum. Here it will be described clearly about how to get the contacts from phone and sim.




回答3:


You can access the contacts using the following API

JSR 75: PDA Optional Packages for the J2METM Platform

http://www.jcp.org/en/jsr/detail?id=75

This is an optional package & maynot be there for all the mobile devices.

You can check the following URL for the sample programs

  1. http://developers.sun.com/mobility/apis/articles/pim/index.html
  2. http://www.java2s.com/Code/Java/J2ME/PersonalInformationManager.htm

Use the following code to check whether the device supports PIM or not :

String currentVersion = System.getProperty("microedition.pim.version" )

if the device is not supported then it will return null.



来源:https://stackoverflow.com/questions/4955323/can-you-access-sim-contacts-from-j2me

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!