Android Guides | Samples

Android.OS.UserManager Class

Manages users and user details on a multi-user system.

See Also: UserManager

Syntax

[Android.Runtime.Register("android/os/UserManager", DoNotGenerateAcw=true)]
public class UserManager : Object

Remarks

Manages users and user details on a multi-user system.

[Android Documentation]

Requirements

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

The members of Android.OS.UserManager are listed below.

See Also: Object

Protected Constructors

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

Public Fields

const
DisallowAddUserString. Specifies if a user is disallowed from adding new users and profiles.
const
DisallowAdjustVolumeString. Specifies if a user is disallowed from adjusting the master volume.
const
DisallowAppsControlString. Specifies if a user is disallowed from modifying applications in Settings or launchers.
const
DisallowConfigBluetoothString. Specifies if a user is disallowed from configuring bluetooth.
const
DisallowConfigCellBroadcastsString. Specifies if a user is disallowed from configuring cell broadcasts.
const
DisallowConfigCredentialsString. Specifies if a user is disallowed from configuring user credentials.
const
DisallowConfigMobileNetworksString. Specifies if a user is disallowed from configuring mobile networks.
const
DisallowConfigTetheringString. Specifies if a user is disallowed from configuring Tethering & portable hotspots.
const
DisallowConfigVpnString. Specifies if a user is disallowed from configuring VPN.
const
DisallowConfigWifiString. Specifies if a user is disallowed from changing Wi-Fi access points.
const
DisallowCreateWindowsString. Specifies that windows besides app windows should not be created.
const
DisallowCrossProfileCopyPasteString. Specifies if what is copied in the clipboard of this profile can be pasted in related profiles.
const
DisallowDebuggingFeaturesString. Specifies if a user is disallowed from enabling or accessing debugging features.
const
DisallowFactoryResetString. Specifies if a user is disallowed from factory resetting from Settings.
const
DisallowInstallAppsString. Specifies if a user is disallowed from installing applications.
const
DisallowInstallUnknownSourcesString. Specifies if a user is disallowed from enabling the "Unknown Sources" setting, that allows installation of apps from unknown sources.
const
DisallowModifyAccountsString. Specifies if a user is disallowed from adding and removing accounts, unless they are AccountManager.AddAccountExplicitly(Account,String,String) added by Authenticator.
const
DisallowMountPhysicalMediaString. Specifies if a user is disallowed from mounting physical external media.
const
DisallowOutgoingCallsString. Specifies that the user is not allowed to make outgoing phone calls.
const
DisallowRemoveUserString. When set on the primary user this specifies if the user can remove other users.
const
DisallowShareLocationString. Specifies if a user is disallowed from turning on location sharing.
const
DisallowSmsString. Specifies that the user is not allowed to send or receive SMS messages.
const
DisallowUninstallAppsString. Specifies if a user is disallowed from uninstalling applications.
const
DisallowUnmuteMicrophoneString. Specifies if a user is disallowed from adjusting microphone volume.
const
DisallowUsbFileTransferString. Specifies if a user is disallowed from transferring files over USB.
const
EnsureVerifyAppsString. Specifies if a user is disallowed from disabling application verification.

Public Properties

[read-only]
IsUserAGoatBoolean. Used to determine whether the user making this call is subject to teleportations.
[read-only]
UserCountInt32. Return the number of users currently created on the device.
[read-only]
UserNameString. Returns the user name of the user making this call.
[read-only]
UserProfilesIList<UserHandle>. Returns a list of UserHandles for profiles associated with the user that the calling process is running on, including the user itself.
UserRestrictionsBundle. Returns the user-wide restrictions imposed on this user.

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

GetApplicationRestrictions(String) : Bundle
Returns a Bundle containing any saved application restrictions for this user, for the given package name.
GetSerialNumberForUser(UserHandle) : Int64
Return the serial number for a user.
GetUserForSerialNumber(Int64) : UserHandle
Return the user associated with a serial number previously returned by UserManager.GetSerialNumberForUser(UserHandle).
GetUserRestrictions(UserHandle) : Bundle
Returns the user-wide restrictions imposed on the user specified by userHandle.
HasUserRestriction(String) : Boolean
Returns whether the current user has been disallowed from performing certain actions or setting certain settings.
IsUserRunning(UserHandle) : Boolean
Return whether the given user is actively running.
IsUserRunningOrStopping(UserHandle) : Boolean
Return whether the given user is actively running or stopping.
SetRestrictionsChallenge(String) : Boolean
Sets a new challenge PIN for restrictions.
SetUserRestriction(String, Boolean)
Sets the value of a specific restriction.
SetUserRestrictions(Bundle, UserHandle)
Sets all the user-wide restrictions for the specified user.