Methods Summary |
---|
public ISyncContext | getISyncContext()
return mSyncContext;
|
public void | onFinished(SyncResult result)
try {
mSyncContext.onFinished(result);
} catch (RemoteException e) {
// this should never happen
}
|
public void | setStatusText(java.lang.String message)Call to update the status text for this sync. This internally invokes
{@link #updateHeartbeat}, so it also takes the place of a call to that.
updateHeartbeat();
|
public void | updateHeartbeat()Call to indicate that the SyncAdapter is making progress. E.g., if this SyncAdapter
downloads or sends records to/from the server, this may be called after each record
is downloaded or uploaded.
final long now = SystemClock.elapsedRealtime();
if (now < mLastHeartbeatSendTime + HEARTBEAT_SEND_INTERVAL_IN_MS) return;
try {
mLastHeartbeatSendTime = now;
mSyncContext.sendHeartbeat();
} catch (RemoteException e) {
// this should never happen
}
|