views:

38

answers:

1

Hi everyone.

I'm building a phone application in j2me. In it, I need to get the contacts from the phonebook. There is an API for that and the line I tried to use was

contactList = (ContactList) PIM.getInstance().openPIMList(PIM.CONTACT_LIST, 
               PIM.READ_ONLY, name);

Apparently, it doesn't work in my phone (Sony Ericsson W705). That's why I was wondering whether there is a different API that I can access the phonebook in J2Me. If there is such an option, how can I check whether the person running the application has a sony ericsson (or nokia, samsung..)?

A: 
  1. Sony-Ericsson W705 supports JSR-75 (file and PIM access API) - e.g. look here
  2. There's no other API which supports PIM access
  3. You can't check dynamically does particular phone supports given API or not? Common practice is to build several versions for different phones.
barmaley