Android app shortcuts are a special feature added in Android 7.1 (API 25). Shortcuts are special actions that appear when you long press on a launcher icon, that will trigger a specified intent. With this post you will learn how to create both static and dynamic app shortcuts. The only pre-requisite is that your app is targeting API 25 or greater.

Static Shortcuts

Static app shortcuts are shortcuts that are defined via XML. This means they are created at compile time, and will be consistent as long as your app is on the user’s device. Common use cases for this would be to launch a regularly used activity in your app that is not the launcher activity.

Android has a built in SearchView component but it doesn’t feel much like Material Design. This has even been asked on StackOverflow because developers are having trouble recreating the same MaterialSearchView that appears in many of Google’s applications. However, thanks to one of my good friends Maurício, you can now implement this great component in your own projects!