Android.App.Admin.DevicePolicyManager.SetStorageEncryption Method
Called by an application that is administering the device to request that the storage system be encrypted.

Syntax

[Android.Runtime.Register("setStorageEncryption", "(Landroid/content/ComponentName;Z)I", "GetSetStorageEncryption_Landroid_content_ComponentName_ZHandler")]
[return:Android.Runtime.GeneratedEnum]
public virtual EncryptionStatus SetStorageEncryption (Android.Content.ComponentName admin, bool encrypt)

Parameters

admin
Which Android.App.Admin.DeviceAdminReceiver this request is associated with.
encrypt
true to request encryption, false to release any previous request

Returns

Documentation for this section has not yet been entered.

Remarks

Called by an application that is administering the device to request that the storage system be encrypted.

When multiple device administrators attempt to control device encryption, the most secure, supported setting will always be used. If any device administrator requests device encryption, it will be enabled; Conversely, if a device administrator attempts to disable device encryption while another device administrator has enabled it, the call to disable will fail (most commonly returning DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE).

This policy controls encryption of the secure (application data) storage area. Data written to other storage areas may or may not be encrypted, and this policy does not require or control the encryption of any other storage areas. There is one exception: If Android.OS.Environment.IsExternalStorageEmulated is true, then the directory returned by Android.OS.Environment.ExternalStorageDirectory must be written to disk within the encrypted storage area.

Important Note: On some devices, it is possible to encrypt storage without requiring the user to create a device PIN or Password. In this case, the storage is encrypted, but the encryption key may not be fully secured. For maximum security, the administrator should also require (and check for) a pattern, PIN, or password.

[Android Documentation]

Requirements

Namespace: Android.App.Admin
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 11