If your contact synchronization is separate from your chat application, you should use SyncAdapter. It works like Android service, so it can sync contacts with the server even if your chat application doesn’t work. See the following URL SampleSyncAdapterprovided by Google, which provides the source code and information for creating your own SyncAdapter... http://developer.android.com/resources/samples/SampleSyncAdapter/index.html
If you want to synchronize contacts only when the application is running, you actually do not need any kind of synchronization mechanism, you just need to add contacts to your device.
, ContactsContract, Android. ContactsContract , - , ContactsContract.CommonDataKinds.Email . . URL ContactsContract... http://developer.android.com/reference/android/provider/ContactsContract.html
SampleSyncAdapter http://developer.android.com/resources/samples/SampleSyncAdapter/index.html, , Android, , ContactsContract SyncAdapter, .