android-shortcutmanager

Android Quick shortcuts [passing intent extra(or some data) in shortcuts.xml ]

自作多情 提交于 2020-01-24 12:09:10
问题 While implementing the static Shortcuts using shortcut.xml, i would like to pass few bundle extras with my intent. need the passed extras to decide on few functionality in the target class after launching the app. is it possible to access the extras? how and where to access it? Any leads would be highly appreciated 回答1: I'm not sure if there is another way, but I use this: <intent android:action="android.intent.action.VIEW" android:targetPackage="target.package" android:targetClass="activity

Android Quick shortcuts [passing intent extra(or some data) in shortcuts.xml ]

╄→尐↘猪︶ㄣ 提交于 2020-01-24 12:08:29
问题 While implementing the static Shortcuts using shortcut.xml, i would like to pass few bundle extras with my intent. need the passed extras to decide on few functionality in the target class after launching the app. is it possible to access the extras? how and where to access it? Any leads would be highly appreciated 回答1: I'm not sure if there is another way, but I use this: <intent android:action="android.intent.action.VIEW" android:targetPackage="target.package" android:targetClass="activity

Update android SDK : install latest platform to implement new APIs such as “ShortcutManager”

冷暖自知 提交于 2019-12-23 07:29:07
问题 Here i am performing demo for Android Shortcuts introduces in android nougat App Shortcuts I have used following code to create app shortcut ShortcutManager shortcutManager; if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) { shortcutManager = getSystemService(ShortcutManager.class); ShortcutInfo shortcut; if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N_MR1) { shortcut = new ShortcutInfo.Builder(this, "second_shortcut") .setShortLabel(getString