Can you access sim contacts from J2ME?

2019-08-15 05:27发布

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

Is this possible?

3条回答
趁早两清
2楼-- · 2019-08-15 05:44

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楼-- · 2019-08-15 05:44

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.

查看更多
Rolldiameter
4楼-- · 2019-08-15 05:53

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.

查看更多
登录 后发表回答