File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java Micro Edition and the fly likes Can we access the PhoneBook through J2ME Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Can we access the PhoneBook through J2ME" Watch "Can we access the PhoneBook through J2ME" New topic
Author

Can we access the PhoneBook through J2ME

Chaitanya Varanasi
Greenhorn

Joined: Dec 09, 2004
Posts: 26
Hi All,
I have a Small doubt with regard to J2ME. What my doubt is that....I want to Access the Phone Numbers which are present in the Mobile and do the CRUD operations. I have no idea about how to proceed to this... The project which I need to develop is , to make a Layer on the top of the Contacts and do the Basic CRUD operations which will directly effect on the Mobile on to which its deployed... I hope you all got the Point

Any Pointers would be of great Help..

Thanks in Advance,
Chaitanya V
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

No you do not have access to the Phone Book, as it is outside the sandbox. Now a device manufacturer can provide their own proprietary API for connecting to their phonebook, however, this is a big security risk. If I could write a J2ME app that access your PhoneBook, I could in theory delete all your entries without you knowing, and you would be really really mad.

You can get phone nummbers form the Phonebook through a TextBox, but only read only and only as a way to select a number from a "dropdown"

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Chaitanya Varanasi
Greenhorn

Joined: Dec 09, 2004
Posts: 26
Thanks Mark!!! Thanks for your quick reply
Chaitanya Varanasi
Greenhorn

Joined: Dec 09, 2004
Posts: 26
Mark,
How about using PIM (JSR 75)? I have seen that Nokia Phones right from 60 Series are supporting this API...

Thanks,
Chaitanya V
Debojit Nag
Ranch Hand

Joined: Jul 19, 2005
Posts: 44
Hi
As per my knowledge. you can't access the device original phone book. But alternatively you can create your own phone book using PIM(JSR 75)which nothing but a small DB importing "javax.microedition.pim.PIM". Here you can create separately contact list, event list and to do list. But this db has no connection with device phone book.

Regards,
Debojit


Thanks,<br />Debojit Nag
Eduardo Marques
Ranch Hand

Joined: Feb 19, 2005
Posts: 231
Some limited access to the phonebook can be achieved by creating a MIDP 2.0 TextField or TextBox with the PHONENUMBER constraint.

On some devices, this will enable a shortcut key or some kind of scheme
that lets you access the device's phonebook and read a number into the TextField/TextBox .
[ January 08, 2006: Message edited by: Eduardo Marques ]

Eduardo Marques
Get ready for your SCMAD certification at J2MECertificate.com - See what all the buzz is about ...
Rashid Mayes
Ranch Hand

Joined: Jan 11, 2006
Posts: 160
You can access the device phone book through JSR75. And some devices support non standard APIs for accessing the phone book. For example, Motorola Iden devices and the v600 series both have phonebook access APIs. There are plenty of examples. Try going the the developer site of the manufacturer that you are using.
[ January 12, 2006: Message edited by: Jim Hall ]

Rashid Mayes
http://www.hostj2me.com/ - http://www.worlddeveloper.org/
eman hossny
Greenhorn

Joined: Jan 29, 2006
Posts: 1
plz,send to me any code which access mobile phone book
any help pleeeeeeez,thanx
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Originally posted by eman hossny:
plz,send to me any code which access mobile phone book
any help pleeeeeeez,thanx


The problem with that is that it would be different for each phone. Since there is not a J2ME API for access, there are proprietary apis by the manufacturer, and then there are phones that support JSR 75, but not many do.

So we can't really post sample code. It is a matter of determining the phone type and going to their developer site to find out the API calls.

Mark
payal agrawal
Ranch Hand

Joined: Oct 11, 2005
Posts: 44
Look at the URL below:

How to find contacts from PhoneBook of mobile phone
http://www.java-tips.org/content/view/1379/73/

How to import Contact into phonebook
http://www.java-tips.org/content/view/1380/73/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can we access the PhoneBook through J2ME
 
Similar Threads
doubt
Doubt in entity bean !! its urgent
Doubt...
Connecting Database From JavaFX on Windows Mobile
Design implementation Doubt Please tell me the best approach