Android.Content.RestrictionsManager Class
Provides a mechanism for apps to query restrictions imposed by an entity that manages the user.

See Also: RestrictionsManager Members

Syntax

[Android.Runtime.Register("android/content/RestrictionsManager", DoNotGenerateAcw=true)]
public class RestrictionsManager : Java.Lang.Object

Remarks

Provides a mechanism for apps to query restrictions imposed by an entity that manages the user. Apps can also send permission requests to a local or remote device administrator to override default app-specific restrictions or any other operation that needs explicit authorization from the administrator.

Apps can expose a set of restrictions via an XML file specified in the manifest.

If the user has an active Restrictions Provider, dynamic requests can be made in addition to the statically imposed restrictions. Dynamic requests are app-specific and can be expressed via a predefined set of request types.

The RestrictionsManager forwards the dynamic requests to the active Restrictions Provider. The Restrictions Provider can respond back to requests by calling RestrictionsManager.NotifyPermissionResponse(string, Android.OS.PersistableBundle), when a response is received from the administrator of the device or user. The response is relayed back to the application via a protected broadcast, RestrictionsManager.ActionPermissionResponseReceived.

Static restrictions are specified by an XML file referenced by a meta-data attribute in the manifest. This enables applications as well as any web administration consoles to be able to read the list of available restrictions from the apk.

The syntax of the XML format is as follows:

The attributes for each restriction depend on the restriction type.

In your manifest's application section, add the meta-data tag to point to the restrictions XML file as shown below:

See Also

[Android Documentation]

Requirements

Namespace: Android.Content
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0