07-19-2011 01:23 AM
On BlackBerry I want to display an "Add contact" dialog with some fields populated.
I supposed the following code would work:
BlackBerryContact contact = (BlackBerryContact) mContactList.createContact();
AddressBookArguments args = new AddressBookArguments( AddressBookArguments.ARG_NEW, contact);
but no way. If I Invoke with ARG_NEW a completely EMPTY fields are displayed.
If I Invoke with ARG_COMPOSE an IllegalArgumentException is thrown. Is there any way I can display "Add contact" with some fields filled in?
Solved! Go to Solution.
07-19-2011 01:53 AM
For this use listField and customise it based on your requirement.
BlackBerryContactList contacts = (BlackBerryContactList)BlackBerryPIM.getInstance()
Object contact_selected = contacts.choose();
Thanks & Regards
07-19-2011 03:04 AM
07-19-2011 03:19 AM
If I fill some fields in "Add contact" then user can press "cancel" and the contact will not appear in contact list.
just as an idea: maybe you have to commit the contact prior to opening the compose view?
otherwise it may not be possible, you'd have to write your own GUI to edit the contacts fields.