com.nokia.mid.pim
Class ContactChangeManager

java.lang.Object
  extended by com.nokia.mid.pim.ContactChangeManager

public class ContactChangeManager
extends java.lang.Object

ContactChangeManger is used to manage receiving contact changes when requester application is running or history contact change when it is not running

If requester application want to receive contact changes when it is running, it can register a ContactChangeListener to receive notification when there is any contact change

Note: when receive delete contact event, because the contact is already deleted, there is no way to get contact list name, the contact list name in onContactChange is invalid.

Code example as below
class MyClass extends MIDlet implements ContactChangeListener {
    public onContactChange(ContactChane[] changes) {
       for(int i = 0; i < changes.length; ++i) {
           System.out.println("Index " + i + " contact UID = " + changes[i].contactUID);
           System.out.println("Index " + i + " contact list name = " + changes[i].contactListName);
           System.out.println("Index " + i + " contact change type = " + changes[i].changeType);
       }
    }

    public startApp () {
      ContactChangeManager.addChangeListener(this);
    }
}

If requester application want to receive contact changes when is not running, before exit it can send request to platform record those contact changes and receive those changes after it is launched next time. In this case, requester application should also register a ContactChangeListener to receive those changes before request platform send back those recorded contact changes.


Constructor Summary
ContactChangeManager()
           
 
Method Summary
static void addChangeListener(ContactChangeListener listener)
          add a contact change listener
static void removeChangeListener(ContactChangeListener listener)
          remove a contact list change listener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContactChangeManager

public ContactChangeManager()
Method Detail

addChangeListener

public static void addChangeListener(ContactChangeListener listener)
add a contact change listener

Parameters:
listener - the contact change listener to add

removeChangeListener

public static void removeChangeListener(ContactChangeListener listener)
remove a contact list change listener

Parameters:
listener - the contact change listener to remove


Copyright © 2012 Nokia Corporation. All rights reserved.

Nokia is registered trademark of Nokia Corporation. Java and all Java-based marks are trademarks or registered trademarks of Oracle Corporation. Other product and company names mentioned herein may be trademarks or trade names of their respective owners. This document is confidential information of Nokia Corporation.

Disclaimer
The information in this document is provided "as is," with no warranties whatsoever, including any warranty of merchantability, fitness for any particular purpose, or any warranty otherwise arising out of any proposal, specification, or sample. Furthermore, information provided in this document is preliminary, and may be changed substantially prior to final release.

Nokia Corporation disclaims all liability, including liability for infringement of any proprietary rights, relating to this document and implementation of any information presented in this document.

Nokia Corporation retains the right to make changes to this document at any time, without notice.

License
Subject to above disclaimer, a license is hereby granted to use this documentation solely under existing Limited License Agreement and non-disclosure agreement between the companies for the agreed application development for Series 40 Nokia phones. No other licenses e.g. to any intellectual property rights are granted herein. Any use of the screen shots of this documentation, including any icons thereof, is subject to Nokia's prior written approval.