pgentili
pgentili

Reputation: 659

Static shortcut not showing in pre-7.1 device

I've just implemented 3 static shortcuts and they work well in android 7.1 as expected. However, using static shortcuts, I expected them working also in devices with Android 7.0 (or 6, not tried) with Nova Launcher but they are not showing up. Why? Here's my code for one of them:

    <shortcut
        android:shortcutId="ND Fragment"
        android:enabled="true"
        android:icon="@drawable/icon_filter"
        android:shortcutShortLabel="@string/title_nd"
        android:shortcutLongLabel="@string/title_nd">
        <intent
            android:action="android.intent.action.VIEW"
            android:targetPackage="com.gmail.nellorocca.dslrtools"
            android:targetClass="com.gmail.nellorocca.dslrtools.MainActivity">
            <extra android:name="extra_name" android:value="launch_nd"/>
        </intent>

        <categories android:name="android.shortcut.conversation" />
    </shortcut>

Upvotes: 1

Views: 699

Answers (1)

pgentili
pgentili

Reputation: 659

SOLVED thanks to Chris Lacy (Action Launcher's developer) guide. You need to add android:exported=true in any activity you point to.

Source: http://theblerg.net/post/2016/10/1/integrating-android-71s-launcher-shortcuts-into-your-app

Upvotes: 3

Related Questions