like this I want to do with my own shortcuts. And to open particular activity depending on shortcut type
Create an xml named shortcuts.xml
under res, inside xml directory and add following code in it: (to create static shortcuts)
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
android:enabled="true"
android:icon="@mipmap/ic_launcher"
android:shortcutDisabledMessage="@string/static_shortcut_disabled_message"
android:shortcutId="static"
android:shortcutLongLabel="@string/static_shortcut_long_label"
android:shortcutShortLabel="@string/static_shortcut_short_label">
<intent
android:action="android.intent.action.VIEW"
android:targetClass="<Fully_Qualified_Activity_Name>"
android:targetPackage="Package_Name_Of_Activity" />
</shortcut>
</shortcuts>
Inside Manifest.xml
add this meta-data tag for your activity:
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
And test it by long pressing app icon.