Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Navigating your way with App Shortcuts

Navigating your way with App Shortcuts

Not long ago, the iOS users were introduced to a new feature called 3D Touch. What this feature does is to provide a limited list of actions that you can do without entering an app. Of course, the people from Google were ready to respond to that. Boom!!! the App Shortcuts feature was included in Android 7.1.1

5711a187d80c7009bbb5266a7aa8fd67?s=128

Umar Saidu Auna

July 10, 2021
Tweet

Transcript

  1. Navigating your way with App Shortcuts how can I hack

    NASA with navigation app shortcut Start!
  2. Twitter: @umarauna Me Software Engineer @gidimo. a tech community organizer.

    Umar Saidu Auna 2 3 4 1
  3. In the benigi… begining... 1 2 3 4

  4. What is App Shortcuts? What? M T X T F

  5. Beef with iOS 2 3 4 1 Not long ago,

    the iOS users were introduced to a new feature called 3D Touch. What this feature does is to provide a limited list of actions that you can do without entering an app. Of course, the people from Google were ready to respond to that. Boom!!! the App Shortcuts feature was included in Android 7.1.1
  6. Introduction 2 3 4 1 App Shortcuts are designed to

    do common actions in the application from the launcher screen. We can reach certain screens by just long pressing the app icon and clicking the respective shortcut.
  7. There are three different types of App Shortcuts 2 3

    4 1 Static Shortcuts Dynamic Shortcuts Pinned Shortcuts
  8. Static Shortcut 2 3 4 1 These shortcuts are predefined.

    They come together with your .apk. Their number and actions stay the same until you publish a new version of your app.
  9. Dynamic Shortcut 2 3 4 1 These shortcuts are constructed

    and included in the list with shortcuts on the fly. They can be created based on some usage statistics and can change over time. There is no need to publish a new version of your app, in order to update your dynamic shortcuts.
  10. Pinned Shortcut 2 3 4 1 are used for specific,

    user-driven actions. For example, a user might want to pin a specific website to the launcher. This is beneficial because it allows the user to perform a custom action, like navigating to the website in one step, more quickly than using a default instance of a browser.
  11. Some famous apps using the App Shortcuts feature 2 3

    4 1 • Google Maps • Google Play Music • Google Photos • Google Drive • Chrome • YouTube • Evernote • Twitter • Whatsapp
  12. Why we need App Shortcuts? Why? M T X T

    F
  13. App Shortcuts allow the user to access primary actions in

    your app straight from the launcher, taking the user deep into your application, by long pressing on your app icon. M T X T F Why?
  14. X T F Why?

  15. Don’t over do it please….. Best practices M T X

    T F
  16. Design Guidelines 2 3 4 1 Follow the design guidelines

    Publish only four distinct shortcuts Limit shortcut description length -> 10 short description, 25 long description If using system icons, there size should be 24 x 24 (dp). Use SVG icons for automatic scaling.
  17. Limitation 2 3 4 1 According to the official Android

    documentation, the current API supports up to five different shortcuts at any given time. BUT it is highly recommended to use maximum four of them.
  18. Limitation 2 3 4 1 Another limitation is the launcher

    of the current device. Not all launchers support App Shortcuts yet. That is, before releasing this new feature we must test it on as many different launchers as possible.
  19. for the web Nation : width ℎ : height M

    T X T F Federal Republic of Web Developers
  20. Web nation 2 3 4 1 - Chrome 84 for

    Android - Edge 84 for Windows Check here https://speakerdeck.com/tiwu_dev/app- shortcuts
  21. How can we implement it? How? M T X T

    F
  22. Code. Code.. Code… Code…. There are three static shortcuts in

    the app. For each shortcut we must provide: 2 3 4 1 • shortcutId: The ID of the shortcut. • enabled: The current state of the shortcut. It can be either true or false. If the shortcut is disabled it won’t appear in the list with shortcuts. • shortcutShortLabel / shortcutLongLabel: The labels which contain the name of the shortcut. Their length is limited. Usually the short one is used when the shortcut is pinned to the home screen. The long label is used for the app shortcut menu. • shortcutDisabledMessage: The message, which is shown to the user when a disabled pinned shortcut was selected.
  23. Note Each intent must have an action! Otherwise, your app

    will start shaking! 2 3 4 1 android:action="android.intent.action.VIEW"
  24. Enough talking, show me the code Let’s Write some code

    2 3 4 1
  25. Resources • https://blog.iamsuleiman.com/android-app-shortcuts-how-and-when-to-use-them/ • https://www.journaldev.com/28529/android-n-app-shortcuts • https://medium.com/@andreworobator/implementing-android-app-shortcuts-74feb524959b • https://guides.codepath.com/android/Creating-App-Shortcuts-in-Launcher •

    https://developer.android.com/guide/topics/ui/shortcuts/creating-shortcuts • https://medium.com/android-news/app-shortcuts-in-details-afc1059485a7 • https://commondatastorage.googleapis.com/androiddevelopers/shareables/design/app- shortcuts-design-guidelines.pdf
  26. Codebase - sample code. https://github.com/UmarAuna/Navigation- App-Shortcut-IO 2 3 4 1

  27. Thank You Questions? Questions? Questions?