- Dynamic shortcuts are context sensitive and are displayed by launchers like nova launcher by long pressing the app icon and only exist in android `>=7.1`. Android apps can register dynamic shortcuts with the `ShortcutManager` at runtime by sending a list of [ShortcutInfo](https://developer.android.com/reference/android/content/pm/ShortcutInfo) objects to [ShortcutManager.addDynamicShortcuts()](https://developer.android.com/reference/android/content/pm/ShortcutManager#addDynamicShortcuts(java.util.List%3Candroid.content.pm.ShortcutInfo%3E)) function. Each `ShortcutInfo` contains information like the icon, label, the real intent and any extras that will be sent when that shortcut will be requested to be launched by the launcher. These shortcuts can be queried by the launcher apps using the [LauncherApps.getShortcuts()](https://developer.android.com/reference/android/content/pm/LauncherApps#getShortcuts(android.content.pm.LauncherApps.ShortcutQuery,%20android.os.UserHandle)) function and passing the [FLAG_MATCH_DYNAMIC](https://developer.android.com/reference/android/content/pm/LauncherApps.ShortcutQuery#FLAG_MATCH_DYNAMIC) query flag.
0 commit comments