com.todoroo.astrid.sync
Class SyncProvider<TYPE extends SyncContainer>

java.lang.Object
  extended by com.todoroo.astrid.sync.SyncProvider<TYPE>

public abstract class SyncProvider<TYPE extends SyncContainer>
extends java.lang.Object

A helper class for writing synchronization services for Astrid. This class contains logic for merging incoming changes and writing outgoing changes.

Use initiateManual(android.app.Activity) as the entry point for your synchronization service, which should check if a user is logged in. If not, you should handle that in the UI, otherwise, you should launch your background service to perform synchronization in the background.

Your background service should synchronize(android.content.Context), which in turn invokes initiateBackground() to initiate synchronization.

Author:
Tim Su

Constructor Summary
SyncProvider()
           
 
Method Summary
 void synchronize(android.content.Context context)
          Synchronize this providerwith sync toast
 void synchronize(android.content.Context context, boolean showSyncToast)
          Synchronize this provider
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyncProvider

public SyncProvider()
Method Detail

synchronize

public void synchronize(android.content.Context context)
Synchronize this providerwith sync toast

Parameters:
context -

synchronize

public void synchronize(android.content.Context context,
                        boolean showSyncToast)
Synchronize this provider

Parameters:
context -
showSyncToast - should we toast to indicate synchronizing?