androidandroid-appshortcutapp-shortcut

Get AppShortcuts provided by an app


If I know an apps package name, how can I get a list of all available app shortcuts?

I can get my own apps shortcuts with the ShortcutManager like described here https://developer.android.com/guide/topics/ui/shortcuts.html, but how do I get a list of another apps shortcuts?


Solution

  • The only app that has access to other apps shortcuts is the default launcher, as determined by hasShortcutHostPermission().

    For the default launcher app, they can use getShortcuts() to get the list of shortcuts.