Skip to content

Instantly share code, notes, and snippets.

@AOrobator
Last active December 6, 2016 01:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AOrobator/ac867477cdd7588c9227109f3d77a473 to your computer and use it in GitHub Desktop.
Save AOrobator/ac867477cdd7588c9227109f3d77a473 to your computer and use it in GitHub Desktop.
Implementing App Shortcuts - ShortcutActions
inline fun shortcutAction(action: (ShortcutManager) -> Unit): Unit {
if (SDK_INT >= N_MR1) {
val shortcutManager = APP_CONTEXT.getSystemService(ShortcutManager::class.java)
action(shortcutManager)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment