Share via


LauncherActivityInfo.User Property

Definition

Returns the user handle of the user profile that this activity belongs to.

public virtual Android.OS.UserHandle? User { [Android.Runtime.Register("getUser", "()Landroid/os/UserHandle;", "GetGetUserHandler")] get; }
[<get: Android.Runtime.Register("getUser", "()Landroid/os/UserHandle;", "GetGetUserHandler")>]
member this.User : Android.OS.UserHandle

Property Value

The UserHandle of the profile.

Attributes

Remarks

Returns the user handle of the user profile that this activity belongs to. In order to persist the identity of the profile, do not store the UserHandle. Instead retrieve its serial number from UserManager. You can convert the serial number back to a UserHandle for later use.

Java documentation for android.content.pm.LauncherActivityInfo.getUser().

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.

Applies to

See also