Build 1.0_r1(from source)

android.content
Class SyncAdapter

java.lang.Object
  extended by android.content.SyncAdapter
Direct Known Subclasses:
TempProviderSyncAdapter

public abstract class SyncAdapter
extends Object


Nested Class Summary
(package private)  class SyncAdapter.Transport
           
 
Field Summary
static int LOG_SYNC_DETAILS
          Kernel event log tag.
(package private)  SyncAdapter.Transport mTransport
           
 
Constructor Summary
SyncAdapter()
           
 
Method Summary
abstract  void cancelSync()
          Cancel the most recently initiated sync.
(package private)  ISyncAdapter getISyncAdapter()
          Get the Transport object.
abstract  void startSync(SyncContext syncContext, String account, Bundle extras)
          Initiate a sync for this account.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_SYNC_DETAILS

public static final int LOG_SYNC_DETAILS
Kernel event log tag. Also listed in data/etc/event-log-tags.

See Also:
Constant Field Values

mTransport

SyncAdapter.Transport mTransport
Constructor Detail

SyncAdapter

public SyncAdapter()
Method Detail

getISyncAdapter

final ISyncAdapter getISyncAdapter()
Get the Transport object. (note this is package private).


startSync

public abstract void startSync(SyncContext syncContext,
                               String account,
                               Bundle extras)
Initiate a sync for this account. SyncAdapter-specific parameters may be specified in extras, which is guaranteed to not be null. IPC invocations of this method and cancelSync() are guaranteed to be serialized.

Parameters:
syncContext - the ISyncContext used to indicate the progress of the sync. When the sync is finished (successfully or not) ISyncContext.onFinished() must be called.
account - the account that should be synced
extras - SyncAdapter-specific parameters

cancelSync

public abstract void cancelSync()
Cancel the most recently initiated sync. Due to race conditions, this may arrive after the ISyncContext.onFinished() for that sync was called. IPC invocations of this method and startSync() are guaranteed to be serialized.


Build 1.0_r1(from source)

Please submit a feedback, bug or feature