Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Archived:Contact update deletes contact information in S60 3rd Edition FP1 (Known Issue)

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.

Article Metadata
Tested with
Devices(s): S60 3rd Edition FP1 emulator and devices
Compatibility
Platform(s):
S60 3rd Edition FP1
Article
Created: User:Technical writer 1 (11 Dec 2008)
Last edited: hamishwillee (26 Jul 2013)


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

  1. Implement a MIDlet using the piece of code given in Archived:Adding and updating a PIM contact using Java ME.
  2. Launch the MIDlet. The MIDlet creates a contact into the Phonebook with the following information: First Name, Company, Mobile, Fax, Email, and Birthday.
  3. 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.
  4. Launch the MIDlet again. The MIDlet updates the contact created in step 2.
  5. 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.

This page was last modified on 26 July 2013, at 06:17.
484 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×