1

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:

  1. An older version of the app in the Closed testing - Alpha track
  2. The build in question in the Internal Testing track
  3. 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?

1 Answer 1

2

There are a few things you may be missing.

  • A "default-url" meta-data tag needs to be added to your app link'd activity. Google does not explain this in any of their documentation but it is absolutely required. You can see it in this sample project's manifest (https://github.com/android/app-bundle-samples/blob/main/InstantApps/install-api/app/src/main/AndroidManifest.xml)
  • Your assetlinks.json on the subdomain can only include one app (your instant enabled app).
  • When publishing the app in the Play Store Console I believe you need to ALSO create a release and select your AAB while 'instant apps only' is selected - it's a confusing UX (see attached screenshot below). The internal test track works for instant app links, but only for users that you've added as your 100 testers AND who have gone to the provided link and accepted being a tester.
  • Whispers around the internet say is can take 24hrs for Google to get the instant app links working after publishing. I've seen it work within an hour, but your mileage may vary here.
  • Google Play Instant links also appear broken if you are signed in to the device with a Google Workspace account (instead of a normal Google account).
  • There are two confusing device settings: 1) the Google Play app settings has a switch to upgrade instant app links or not. This setting is off by default - however a user will be prompted the first time clicking an Instant App link about whether or not they want to enable Instant Apps (which will enable this setting for them if they agree). 2) There is an instant apps switch in device settings (on Pixel devices anyways, I don't see it on other devices). This setting entirely disables instant apps (not only will links not work, but "Try Now" will never show on the Play Store). That setting has instant apps enabled by default.
  • Yahoo Finance is instant enabled, so if you want to test out what the experience is like on a particular device you can test with random links from them. (example: https://finance.yahoo.com/news/half-of-zillows-top-cities-for-first-time-homebuyers-are-in-the-midwest-114143526.html)
  • Double check to ensure "Google Play Instant" is both added and enabled under Play Console Advanced settings -> Form Factors.
  • (edit) You can also use the "launch" query parameter on a Google Play link if your app is instant enabled. For example, this link will launch the Yahoo Finance instant app (https://play.google.com/store/apps/details?id=com.yahoo.mobile.client.android.finance&launch=true)
  • (edit) The instant app version code being lower is no longer relevant since its all required to be in the same AAB these days. If you select the same AAB while "Instant Apps Only" is selected that you uploaded while "Phone, Tablets, Chrome OS" was selected then it will work.
  • Good luck!

instant apps only se

1
  • Thanks a lot! I've also struggled a lot. The fact that i had to use a Google workspace account solved the mystery for me. I haven't seen that mentioned. Anywhere! Whn i use a regular accoount, the instant app launches no-problem, when i use the "try now" button in Play. Only after that point, the app link starts working, and resumes the app, without a hitch after that.
    – Christian
    Commented Jun 12 at 9:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.