Compartir a través de


PackageManager.GetUserBadgedLabel(String, UserHandle) Method

Definition

If the target user is a managed profile of the calling user or the caller is itself a managed profile, then this returns a copy of the label with badging for accessibility services like talkback.

public string GetUserBadgedLabel (string label, Android.OS.UserHandle user);
member this.GetUserBadgedLabel : string * Android.OS.UserHandle -> string

Parameters

label
String

The label to change.

user
UserHandle

The target user.

Returns

A label that combines the original label and a badge as determined by the system.

Remarks

If the target user is a managed profile of the calling user or the caller is itself a managed profile, then this returns a copy of the label with badging for accessibility services like talkback. E.g. passing in "Email" and it might return "Work Email" for Email in the work profile.

Java documentation for android.content.pm.PackageManager.getUserBadgedLabel(java.lang.CharSequence, 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