This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
You cannot. MIDP and CLDC security restrictions do not permit you to access any of the phone's applications outside J2ME sandbox. The only access allowed by MIDP 2.0 is accessing the phonebook from a TextField that is of type PHONENUMBER for convenience purposes and that too only for selecting the number.
To be clear: in MIDP 2.0 there is no way for a MIDlet to access a phone number from the user's phone-book. However, if its UI includes a text field with type PHONENUMBER, then the phone can provide a convenient way for the user to select a number for that field from their phone-book. To the MIDlet, it's just the same as if the user typed the number. For a MIDlet to be able to edit/add/delete phone-book entries, the phone would have to support the JSR-75 'PIM optional package'. I've not seen a phone announced yet that supports that, but they'll no doubt be coming soon. It's possible that some manufacturers might already have provided a proprietary extension to MIDP that provides that provides the same features as the PIM optional package: check the manufacturers' developer sites for this kind of thing. Nokia at least hasn't done this. [ February 24, 2004: Message edited by: David Price ]