I am trying to access the address book using PIM api. I tried using RIM's PIM api but it said, cannot access the methods due to restrictions on the api. Then I tried using javax.microedition.pim.* api. The code is running find and is not reflecting any error or exception.

But for some reason it is not reading the contacts, everytime I try to see the number of elements fetched I get zero as the answer....

I am trying to access the address book using PIM api. I tried using RIM's PIM api but it said, cannot access the methods due to restrictions on the api. Then I tried using javax.microedition.pim.* api. The code is running find and is not reflecting any error or exception.

But for some reason it is not reading the contacts, everytime I try to see the number of elements fetched I get zero as the answer....

This code is using BackBerryContact thing...which jde version are you working on...m on jde 4.2.1 and for some reason I am getthing this error when try to use it...."You cannot access this class due to restrictions on your api..."path to the jar""...

I hate to admit but I guess I have done the silliest error and have wasted two full days doing that....i made the code for address book and was looking for the things from the contacts...never realized it is not what i need to look for.....damn I am a fool...

Well anyways...yet another thing added to my kitty...m gaining everytime...thanks arunk and my friend Ivanov...i knew u rock and u still are great....next question....why i am not able to use "BlackberryContact" it is giving api restricted error....what is that???

Contacts is the address book. The code I've posted was tested creating the contacts in the BB application and then reading them.

do you call contact.commit(); when adding your own contacts programmatically?

well yes....i did..i can see the contacts created from the address book we get from the calling menu we get once we press the Calling button...and I checked the Contacts application list...I cant see the contacts that I created....how come is it so?