Unable to upload bundle with InstantApp and installable app

Viewed 108

I have an app that has a base module :app in which AndroidManifest.xml does not have any activities.

I have another module :main_app in which AndroidManifest.xml has a launcher activity.

Then I have another module :instant_experience in which AndroidManifest.xml has an activity for the instant app. This activity has intent-filter set up to be triggered from a specific host.

When I upload the bundle to the Play Store, I am getting the following error:

You must provide an entry point for your Instant App APKs. It can be either a URL, or an Activity with ACTION_MAIN and CATEGORY_LAUNCHER.

FYI, the dependency graph is :main_app and :instant_experience are depending on :app module.

Please help!

1 Answers

Did you add "DEFAULT" category to your intent filter in :instant_experience?

Here is what we have for our app, in our instant module's AndroidManifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:dist="http://schemas.android.com/apk/distribution"
    xmlns:tools="http://schemas.android.com/tools"
    package="a.b.c.instant">

    <dist:module
        dist:instant="true"
        dist:title="@string/module_instant_title">
        <dist:delivery>
            <dist:install-time />
        </dist:delivery>
        <dist:fusing dist:include="true" />
    </dist:module>

    <application>
        <activity
            android:name=".InstantActivity"
            android:theme="@style/Theme.Splashscreen"
            android:visibleToInstantApps="true"
            tools:targetApi="o">

            <meta-data
                android:name="default-url"
                android:value="https://www.example.org/foo/bar" />

            <intent-filter android:autoVerify="true">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data
                    android:scheme="http" />
                <data
                    android:scheme="https"
                    android:host="www.example.org"
                    android:pathPrefix="/foo/" />
            </intent-filter>
        </activity>
    </application>

</manifest>

Note that we used android:autoVerify="true" in the intent filter to support App Links.
Looks like we also needed to add android:visibleToInstantApps="true" to our instant activity node, but I don't remember why...

Does this example helps you fix your situation? Otherwise, would you mind updating your question with :instant_experience's AndroidManifest.xml?

Related