Need some help figuring out why deep links aren't triggering our instant app in the Google Play store. They still open in the browser. Following this guide, we refactored our previously monolithic Android app into a set of feature modules and one instant module that all depend on our main app's module, which in turn depends on two other non-feature modules:
unrelated_mod-->|
unrelated_mod-->|
instant_mod---->|
app
|-> data_module
|-> server_module
This was a ton of superfluous work that I still think is a dumb requirement. Why the app modules needs to be a dependency, I don't know. You don't either. But this compiles, and, as far as I can tell, it allows our instant module to meet size requirements for an instant app in production. Though, apparently, while we're still just in Internal Testing, the size requirement is lifted.
Nevertheless, we haven't found a way to really check the final size of the instant app. Any ideas?
The main app module's ApplicationManifest
contains both android:targetSandboxVersion="2"
and <dist:module dist:instant="true" />
The instant module's manifest contains:
<dist:module
dist:instant="true"
dist:title="@string/...">
<dist:delivery>
<dist:install-time />
</dist:delivery>
<dist:fusing dist:include="true" />
</dist:module>
Ensured Deep Linking works
With the full app installed, both in development and via the Play Store, our deep links work as expected, opening to the appropriate activity within the instant module of the full app. We have autoVerify="true"
, and Google services finds our assetlinks.json
.
But for completeness, here's the activity definition from the instant module's manifest just to confirm that we're meeting the http
and https
requirement:
<activity
android:name=".InstantActivity"
android:launchMode="singleInstancePerTask"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<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="https" />
<data android:scheme="http" />
<data android:pathPrefix="/path1" />
<data android:pathPrefix="/path2" />
<data android:host="${hostname}" />
</intent-filter>
</activity>
Versioning B.S.
As instructed in the guide, we have set the versionCode
in the app module's build.gradle
to 500000 plus the actual versionCode
we'd prefer to use and then set the instant module's versionCode
to the actual versionCode
we'd prefer to use. (Also dumb, but we get it)
This should meet the requirement that our app be installed as an upgrade over the instant module.
The Play Store:
In Release -> Setup -> Advanced Settings -> Form Factors
, we have an entry for "Google Play Instant" with the state of "Active" and a green checkmark.
In Release -> Releases Overview -> Latest Releases
, we currently have three entries:
- An older version of the app in the Closed testing - Alpha track
- The build in question in the Internal Testing track
- Some unknown, empty third track called "Internal Testing (Instant apps) with a status of Draft
I cannot find any documentation on what this third track is for or how to upload a build to it if that's at all necessary. The Play Store complains if we try to upload the build that's currently sitting in the Internal Testing track. The Play Store support team couldn't even point me at any documentation or tell me what it was for. So... ????
In Release -> Testing -> Internal Testing -> Testers
, we have a list of testers added to the testing track, and we have confirmed those users are logged into the Play Store with the same email addresses used in the testing list.
Additionally, if it wasn't clear, we have setup Release -> Setup -> App signing
and have the appropriate fingerprints in our assetlinks.json
Summary
With all that, still no instant experience from the deep link. We currently launch the deep links from a message in the Google Chat app, and they take us to the Chrome app.
What are we missing?