Android Guides | Samples

Android.Content.RestrictionEntry Class

Applications can expose restrictions for a restricted user on a multiuser device.

See Also: RestrictionEntry

Syntax

[Android.Runtime.Register("android/content/RestrictionEntry", DoNotGenerateAcw=true)]
public class RestrictionEntry : Object, IParcelable, IDisposable

Remarks

Applications can expose restrictions for a restricted user on a multiuser device. The administrator can configure these restrictions that will then be applied to the restricted user. Each RestrictionsEntry is one configurable restriction.

Any application that chooses to expose such restrictions does so by implementing a receiver that handles the Intent.ActionGetRestrictionEntries action. The receiver then returns a result bundle that contains an entry called "restrictions", whose value is an ArrayList.

[Android Documentation]

Requirements

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

The members of Android.Content.RestrictionEntry are listed below.

See Also: Object

Public Constructors

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Fields

const
TypeBooleanRestrictionEntryType (1). Restriction of type "bool".
const
TypeChoiceRestrictionEntryType (2). Restriction of type "choice".
const
TypeIntegerRestrictionEntryType (5). Restriction of type "integer".
const
TypeMultiSelectRestrictionEntryType (4). Restriction of type "multi-select".
const
TypeNullRestrictionEntryType (0). Hidden restriction type.
const
TypeStringRestrictionEntryType (6). Restriction of type "string".

Public Properties

[read-only]
static
CreatorIParcelableCreator.
DescriptionString. Returns the provided user-visible description of the entry, if any.
IntValueInt32. Returns the value of the entry as an integer when the type is RestrictionEntry.TypeInteger.
[read-only]
KeyString. This is the unique key for the restriction entry.
SelectedStateBoolean. Returns the current selected state for an entry of type RestrictionEntry.TypeBoolean.
SelectedStringString. Returns the currently selected string value.
TitleString. Returns the user-visible title for the entry, if any.
TypeRestrictionEntryType. Returns the type for this restriction.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

DescribeContents() : Int32
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
GetAllSelectedStrings() : String[]
Returns the list of currently selected values.
GetChoiceEntries() : String[]
Returns the list of strings, set earlier, that will be presented as choices to the user.
GetChoiceValues() : String[]
Returns the list of possible string values set earlier.
SetAllSelectedStrings(String[])
Sets the current list of selected values for an entry of type RestrictionEntry.TypeMultiSelect.
SetChoiceEntries(String[])
Sets a list of strings that will be presented as choices to the user.
SetChoiceEntries(Context, Int32)
Sets a list of strings that will be presented as choices to the user.
SetChoiceValues(String[])
Sets a list of string values that can be selected by the user.
SetChoiceValues(Context, Int32)
Sets a list of string values that can be selected by the user, similar to RestrictionEntry.SetChoiceValues(String[]).
WriteToParcel(Parcel, ParcelableWriteFlags)
Flatten this object in to a Parcel.