CrossProfileApps.GetProfileSwitchingLabelFormatted(UserHandle) Method

Definition

Return a label that calling app can show to user for the semantic of profile switching -- launching its own activity in specified user profile.

[Android.Runtime.Register("getProfileSwitchingLabel", "(Landroid/os/UserHandle;)Ljava/lang/CharSequence;", "GetGetProfileSwitchingLabel_Landroid_os_UserHandle_Handler", ApiSince=28)]
public virtual Java.Lang.ICharSequence GetProfileSwitchingLabelFormatted (Android.OS.UserHandle userHandle);
[<Android.Runtime.Register("getProfileSwitchingLabel", "(Landroid/os/UserHandle;)Ljava/lang/CharSequence;", "GetGetProfileSwitchingLabel_Landroid_os_UserHandle_Handler", ApiSince=28)>]
abstract member GetProfileSwitchingLabelFormatted : Android.OS.UserHandle -> Java.Lang.ICharSequence
override this.GetProfileSwitchingLabelFormatted : Android.OS.UserHandle -> Java.Lang.ICharSequence

Parameters

userHandle
UserHandle

The UserHandle of the target profile, must be one of the users returned by #getTargetUserProfiles(), otherwise a SecurityException will be thrown.

Returns

a label that calling app can show user for the semantic of launching its own activity in the specified user profile.

Attributes

Remarks

Return a label that calling app can show to user for the semantic of profile switching -- launching its own activity in specified user profile. For example, it may return "Switch to work" if the given user handle is the managed profile one.

Java documentation for android.content.pm.CrossProfileApps.getProfileSwitchingLabel(android.os.UserHandle).

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