PreferenceManager.SetStorageDeviceProtected 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.
Explicitly set the storage location used internally by this class to be device-protected storage.
[Android.Runtime.Register("setStorageDeviceProtected", "()V", "GetSetStorageDeviceProtectedHandler", ApiSince=24)]
public virtual void SetStorageDeviceProtected ();
[<Android.Runtime.Register("setStorageDeviceProtected", "()V", "GetSetStorageDeviceProtectedHandler", ApiSince=24)>]
abstract member SetStorageDeviceProtected : unit -> unit
override this.SetStorageDeviceProtected : unit -> unit
- Attributes
Remarks
Explicitly set the storage location used internally by this class to be device-protected storage.
On devices with direct boot, data stored in this location is encrypted with a key tied to the physical device, and it can be accessed immediately after the device has booted successfully, both <em>before and after</em> the user has authenticated with their credentials (such as a lock pattern or PIN).
Because device-protected data is available without user authentication, you should carefully limit the data you store using this Context. For example, storing sensitive authentication tokens or passwords in the device-protected area is strongly discouraged.
Java documentation for android.preference.PreferenceManager.setStorageDeviceProtected()
.
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.