LauncherApps.HasShortcutHostPermission Property

Definition

Returns whether the caller can access the shortcut information.

public virtual bool HasShortcutHostPermission { [Android.Runtime.Register("hasShortcutHostPermission", "()Z", "GetHasShortcutHostPermissionHandler", ApiSince=25)] get; }
[<get: Android.Runtime.Register("hasShortcutHostPermission", "()Z", "GetHasShortcutHostPermissionHandler", ApiSince=25)>]
member this.HasShortcutHostPermission : bool

Property Value

Attributes

Remarks

Returns whether the caller can access the shortcut information. Access is currently available to:

<ul> <li>The current launcher (or default launcher if there is no set current launcher).</li> <li>The currently active voice interaction service.</li> </ul>

Note when this method returns false, it may be a temporary situation because the user is trying a new launcher application. The user may decide to change the default launcher back to the calling application again, so even if a launcher application loses this permission, it does <b>not</b> have to purge pinned shortcut information. If the calling launcher application contains pinned shortcuts, they will still work, even though the caller no longer has the shortcut host permission.

Java documentation for android.content.pm.LauncherApps.hasShortcutHostPermission().

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