2

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!

Bhavin Desai
  • 220
  • 2
  • 9
  • 1
    The best way to get useful answers is to actually add all three AndroidManifest files here. It allows us to see what you tried, and will certainly result in more help. Additionally, the build.gradle files allow us to see which plugins have been used. E.g. the old and deprecated instant app plugin, or the dynamic feature plugin. Good luck. – Entreco Feb 03 '22 at 17:54

1 Answers1

0

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?

tonymanou
  • 60
  • 7