次の方法で共有


CrossProfileApps.GetProfileSwitchingLabel(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.

public string GetProfileSwitchingLabel (Android.OS.UserHandle userHandle);
member this.GetProfileSwitchingLabel : Android.OS.UserHandle -> string

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.

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