DevicePolicyManager.SetBackupServiceEnabled(ComponentName, Boolean) 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.
Allows the device owner or profile owner to enable or disable the backup service.
[Android.Runtime.Register("setBackupServiceEnabled", "(Landroid/content/ComponentName;Z)V", "GetSetBackupServiceEnabled_Landroid_content_ComponentName_ZHandler", ApiSince=26)]
public virtual void SetBackupServiceEnabled (Android.Content.ComponentName admin, bool enabled);
[<Android.Runtime.Register("setBackupServiceEnabled", "(Landroid/content/ComponentName;Z)V", "GetSetBackupServiceEnabled_Landroid_content_ComponentName_ZHandler", ApiSince=26)>]
abstract member SetBackupServiceEnabled : Android.Content.ComponentName * bool -> unit
override this.SetBackupServiceEnabled : Android.Content.ComponentName * bool -> unit
Parameters
- admin
- ComponentName
Which DeviceAdminReceiver
this request is associated with.
- enabled
- Boolean
true
to enable the backup service, false
to disable it.
- Attributes
Remarks
Allows the device owner or profile owner to enable or disable the backup service.
Each user has its own backup service which manages the backup and restore mechanisms in that user. Disabling the backup service will prevent data from being backed up or restored.
Device owner calls this API to control backup services across all users on the device. Profile owner can use this API to enable or disable the profile's backup service. However, for a managed profile its backup functionality is only enabled if both the device owner and the profile owner have enabled the backup service.
By default, backup service is disabled on a device with device owner, and within a managed profile.
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.