Android.OS.RecoverySystem.RebootWipeUserData Method
Reboots the device and wipes the user data and cache partitions.

Syntax

[Android.Runtime.Register("rebootWipeUserData", "(Landroid/content/Context;)V", "")]
public static void RebootWipeUserData (Android.Content.Context context)

Parameters

context
the Context to use

Exceptions

TypeReason
Java.IO.IOExceptionif writing the recovery command file fails, or if the reboot itself fails.
Java.Lang.SecurityExceptionif the current user is not allowed to wipe data.

Remarks

Reboots the device and wipes the user data and cache partitions. This is sometimes called a "factory reset", which is something of a misnomer because the system partition is not restored to its factory state. Requires the NoType:android/Manifest$permission;Href=../../../reference/android/Manifest.permission.html#REBOOT permission.

[Android Documentation]

Requirements

Namespace: Android.OS
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 8