Package-level declarations

Functions

Link copied to clipboard
fun addDynamicShortcuts(shortcutInfoCompat: List<ShortcutInfoCompat>, context: Context? = null)

Publish the list of dynamic shortcuts. If there are already dynamic or pinned shortcuts with the same IDs, each mutable shortcut is updated.

Link copied to clipboard
@RequiresPermission(value = "com.android.launcher.permission.INSTALL_SHORTCUT")
@RequiresApi(value = 26)
fun createPinnedShortcut(shortcutId: String, shortcutName: String? = null, shortcutIcon: Bitmap? = null, shortcutResultIntent: (Intent) -> PendingIntent? = null, shortcutContext: Context? = null, shortcutIntent: () -> Intent)

Creating a pinned shortcut for your app.

Link copied to clipboard
private fun getContext(context: Context?): Context
Link copied to clipboard
fun removeAllDynamicShortcuts(context: Context? = null)

Delete all dynamic shortcuts from the caller app.

Link copied to clipboard
fun removeDynamicShortcuts(shortcutIds: List<String>, context: Context? = null)

Delete dynamic shortcuts by ID.

Link copied to clipboard
fun setDynamicShortcuts(shortcutInfoCompat: List<ShortcutInfoCompat>, context: Context? = null)

Publish the list of shortcuts. All existing dynamic shortcuts from the caller app will be replaced. If there are already pinned shortcuts with the same IDs, the mutable pinned shortcuts are updated.