Share via


DevicePolicyManager.WipeDevice(WipeDataFlags) Method

Definition

Ask that the device be wiped and factory reset.

[Android.Runtime.Register("wipeDevice", "(I)V", "GetWipeDevice_IHandler", ApiSince=34)]
[Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_WIPE_DATA")]
public virtual void WipeDevice (Android.App.Admin.WipeDataFlags flags);
[<Android.Runtime.Register("wipeDevice", "(I)V", "GetWipeDevice_IHandler", ApiSince=34)>]
[<Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_WIPE_DATA")>]
abstract member WipeDevice : Android.App.Admin.WipeDataFlags -> unit
override this.WipeDevice : Android.App.Admin.WipeDataFlags -> unit

Parameters

flags
WipeDataFlags

Bit mask of additional options: currently supported flags are #WIPE_EXTERNAL_STORAGE, #WIPE_RESET_PROTECTION_DATA, #WIPE_EUICC and #WIPE_SILENTLY.

Attributes

Remarks

Ask that the device be wiped and factory reset.

The calling Device Owner or Organization Owned Profile Owner must have requested DeviceAdminInfo#USES_POLICY_WIPE_DATA to be able to call this method; if it has not, a security exception will be thrown.

Java documentation for android.app.admin.DevicePolicyManager.wipeDevice(int).

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