Android Guides | Samples

Android.Content.ContentResolver.CancelSync Method

Remove the specified sync.


[Android.Runtime.Register("cancelSync", "(Landroid/content/SyncRequest;)V", "")]
public static Void CancelSync (SyncRequest request)


SyncRequest object containing information about sync to cancel.


Remove the specified sync. This will cancel any pending or active syncs. If the request is for a periodic sync, this call will remove any future occurrences. It is possible to cancel a sync using a SyncRequest object that is not the same object with which you requested the sync. Do so by building a SyncRequest with the same adapter, frequency, and extras bundle.

If a periodic sync is specified, the caller must hold the permission Permission.WriteSyncSettings.

[Android Documentation]


Namespace: Android.Content
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions:
Since: Added in API level 1