Archived:Contact update deletes contact information in S60 3rd Edition FP1 (Known Issue)
The article is believed to be still valid for the original topic scope.
Linked Portals & Articles
Article Metadata
Tested with
Compatibility
Article
Contents |
Overview
Updating PIM contacts using the PIM API (JSR-75) removes contact's information in S60 3rd Edition FP1.
Description
Updating contacts using the PIM API (JSR-75) is unsuccessful in S60 3rd Edition. Instead of updating the contact's information, several contact fields are removed after the update.
How to reproduce
- Implement a MIDlet using the piece of code given in Archived:Adding and updating a PIM contact using Java ME.
- Launch the MIDlet. The MIDlet creates a contact into the Phonebook with the following information: First Name, Company, Mobile, Fax, Email, and Birthday.
- Exit the MIDlet. Check the native Contacts application in the Menu to make sure that it contains the created contact with all the information defined in step 2.
- Launch the MIDlet again. The MIDlet updates the contact created in step 2.
- Exit the MIDlet. Check the updated contact in the native Contacts application. The following information remains after the update: First name, Mobile, and Fax.
Solution
This issue has been fixed starting from S60 3rd Edition FP2.
For the affected S60 3rd Edition FP1 devices, this issue can be fixed with PIMItem.getFields() which will return all fields in the item that have data stored for them. For testing this workaround, see the code snippet: Archived:Adding and updating a PIM contact using Java ME.
Edit the code by removing the comment marks from these snippet parts:
/***** PIMItem.getFields() starts here *****/
/*
int[] fields = result.getFields();
for(int i = 0; i < fields.length; i++) {
int fieldIndex = fields[i];
String str = Integer.toString(fields[i]);
String label = result.getPIMList().getFieldLabel(fields[i]);*/
/***** PIMItem.getFields() ends here ****
pimResult.append(str +" "+ label);
pimResult.append("\n");
} */ /***** PIMItem.getFields() ends here *****/
In addition, delete the contact created in the 'How to reproduce' section.
After removing the comment marks from the snippet and deleting the contact, test the workaround by repeating the steps 1-4 described under 'How to reproduce'. The contact is now updated properly without deleting any contact information.

