Google Assistant wont show my apps shortcuts after publish

47 views Asked by At

I am trying to push to google assistant some shortcuts. It's working for the test device because it's connected with my Store account but when i publish the app shortcuts won't pushed into the assistant for any other account

here is my shortcut xlm

<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
    <capability android:name="actions.intent.OPEN_APP_FEATURE">
        <intent
            android:targetPackage="com.example.name"
            android:targetClass="com.example.name.open">
            <parameter
                android:name="feature"
                android:key="featureParam"/>
        </intent>
    </capability>
    <!-- Short and long labels must be @string resource. -->
    <shortcut
        android:shortcutId="openID"
        android:shortcutShortLabel="@string/shortcut_short_labelOpen"
        android:shortcutLongLabel="@string/shortcut_long_labelOpen">
        <capability-binding android:key="actions.intent.OPEN_APP_FEATURE">
            <parameter-binding
                android:value="featureParam"
                android:key="feature"/>
        </capability-binding>
    </shortcut>
</shortcuts>

this is the code for creating the shortcut

        Context context = this;
        Intent intent = new Intent(context, open.class);
        intent.setPackage(context.getPackageName());
        intent.setAction(Intent.ACTION_VIEW);

        ShortcutInfoCompat shortcutOpen = new ShortcutInfoCompat.Builder(context, "openID")
                .setShortLabel("Open")
                .setLongLabel("Open")
                .addCapabilityBinding("actions.intent.OPEN_APP_FEATURE")
                .setIntent(intent)
                .build();

        ShortcutManagerCompat.pushDynamicShortcut(context, shortcutOpen);

and this is what i added to my AndroidManifest xml

<intent-filter tools:targetApi="m">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data android:scheme="https" />
                <data android:host="api.test.com" />
            </intent-filter>

            <meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts" />
        </activity>

i tried to push shortcuts into google assistant but its not working when i publish the app

0

There are 0 answers