ContentResolver.CancelSync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CancelSync(Account, String) |
Cancel any active or pending syncs that match account and authority. |
CancelSync(Uri) |
Obsolete.
Cancel any active or pending syncs that match the Uri. |
CancelSync(SyncRequest) |
Remove the specified sync. |
CancelSync(Account, String)
Cancel any active or pending syncs that match account and authority.
[Android.Runtime.Register("cancelSync", "(Landroid/accounts/Account;Ljava/lang/String;)V", "")]
public static void CancelSync (Android.Accounts.Account? account, string? authority);
[<Android.Runtime.Register("cancelSync", "(Landroid/accounts/Account;Ljava/lang/String;)V", "")>]
static member CancelSync : Android.Accounts.Account * string -> unit
Parameters
- account
- Account
filters the syncs that match by this account
- authority
- String
filters the syncs that match by this authority
- Attributes
Remarks
Cancel any active or pending syncs that match account and authority. The account and authority can each independently be set to null, which means that syncs with any account or authority, respectively, will match.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
CancelSync(Uri)
Caution
deprecated
Cancel any active or pending syncs that match the Uri.
[Android.Runtime.Register("cancelSync", "(Landroid/net/Uri;)V", "GetCancelSync_Landroid_net_Uri_Handler")]
[System.Obsolete("deprecated")]
public virtual void CancelSync (Android.Net.Uri? uri);
[<Android.Runtime.Register("cancelSync", "(Landroid/net/Uri;)V", "GetCancelSync_Landroid_net_Uri_Handler")>]
[<System.Obsolete("deprecated")>]
abstract member CancelSync : Android.Net.Uri -> unit
override this.CancelSync : Android.Net.Uri -> unit
Parameters
- uri
- Uri
the uri of the provider to sync or null to sync all providers.
- Attributes
Remarks
Cancel any active or pending syncs that match the Uri. If the uri is null then all syncs will be canceled.
This member is deprecated. instead use #cancelSync(android.accounts.Account, String)
Java documentation for android.content.ContentResolver.cancelSync(android.net.Uri)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
CancelSync(SyncRequest)
Remove the specified sync.
[Android.Runtime.Register("cancelSync", "(Landroid/content/SyncRequest;)V", "")]
public static void CancelSync (Android.Content.SyncRequest? request);
[<Android.Runtime.Register("cancelSync", "(Landroid/content/SyncRequest;)V", "")>]
static member CancelSync : Android.Content.SyncRequest -> unit
Parameters
- request
- SyncRequest
SyncRequest object containing information about sync to cancel.
- Attributes
Remarks
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.
If a periodic sync is specified, the caller must hold the permission android.Manifest.permission#WRITE_SYNC_SETTINGS
.
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, <b>and</b> extras bundle.
Java documentation for android.content.ContentResolver.cancelSync(android.content.SyncRequest)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.