Slide 1

Slide 1 text

Navigating with App Shortcuts how can I hack NASA with navigation app shortcut Start!

Slide 2

Slide 2 text

Twitter: @umarauna Me Software Engineer @gidimo. a tech community organizer. Umar Saidu Auna 2 3 4 1

Slide 3

Slide 3 text

In the benigi… begining... 1 2 3 4

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

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.

Slide 7

Slide 7 text

There are three different types of App Shortcuts 2 3 4 1 Static Shortcuts Dynamic Shortcuts Pinned Shortcuts

Slide 8

Slide 8 text

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.

Slide 9

Slide 9 text

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.

Slide 10

Slide 10 text

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.

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

Why we need App Shortcuts? Why? M T X T F

Slide 13

Slide 13 text

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?

Slide 14

Slide 14 text

X T F Why?

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

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.

Slide 17

Slide 17 text

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.

Slide 18

Slide 18 text

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.

Slide 19

Slide 19 text

for the web Nation : width ℎ : height M T X T F Federal Republic of Web Developers

Slide 20

Slide 20 text

Web nation 2 3 4 1 - Chrome 84 for Android - Edge 84 for Windows Check here https://speakerdeck.com/tiwu_dev/app- shortcuts

Slide 21

Slide 21 text

How can we implement it? How? M T X T F

Slide 22

Slide 22 text

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.

Slide 23

Slide 23 text

Note Each intent must have an action! Otherwise, your app will start shaking! 2 3 4 1 android:action="android.intent.action.VIEW"

Slide 24

Slide 24 text

Enough talking, show me the code Let’s Write some code 2 3 4 1

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

Codebase - sample code. https://github.com/UmarAuna/Navigation- App-Shortcut-IO 2 3 4 1

Slide 27

Slide 27 text

Thank You Questions? Questions? Questions?