An introduction to App shortcuts feature of android 7.1 (static and dynamic)

An introduction to App shortcuts feature of android 7.1 (static and dynamic)

The Android 7.1 update introduces a variety of new features and capabilities for users and developers. App shortcuts feature of Android 7.1 introduced after fantastic feature of Android 7.0 is multi-tasking. I have recently written a blog for multitasking is available here & Myself Imtiyaz Khalani (Sr, Android Developer) here for your help.

You can use the new shortcuts feature to bring users from the launcher directly to key actions within your app. Users simply long-press your app’s launcher icon to reveal the app’s shortcuts, then tap on a shortcut to jump to the associated action. These shortcuts are a great way to engage users, and they let you surface the functionality of your app even before users launch your app.check out screen shot

Two 1. Static Shortcuts:

App shortcuts feature of android 7.1

App shortcuts: Surface key actions and take users deep into your app instantly.

App shortcuts: long press on message app will show you shortcuts

let’s implement it

Adding App Static Shortcuts to your app programmatically

1. Add Static Shortcuts:

Static shortcuts are published when the app is installed, hence they remain constant throughout the app. Static shortcuts are immutable which means that their icons, description and the Intent it launches cannot be changed without updating to a new version of the app.

NOTE: Static Shortcuts can be removed programmatically, Static shortcuts only disable can’t update


1.1 Create a resource file: res/xml/appshortcuts.xml

1.2 Reference in the AndroidManifest.xml as metadata to the app’s launcher activity

note: only launcher activity(s) supports shortcut feature.

App shortcuts feature of android 7.1

2. Add Dynamic Shortcuts:

API 25 required

3 Enable/Disable Shortcuts

Note :- You can disable static shortcuts as well.

Hope this blog will be useful for you. if you like this blog please share with your friends and comment if any daouts

Thanks & Regards
Imtiyaz Khalani
Sr. Android Developer

1 thought on “An introduction to App shortcuts feature of android 7.1 (static and dynamic)

Leave a Comment