1

I'm trying to build instant app example from google samples.

I'm using Android Studio 3.0 beta 2 and my Nexus 5x real device with Android 8.0.0 version.

The source code I'm using is Github google samples project - android-instant-apps/hello-java. The only things I changed in this source code is my website links and app id.

I published this app on google play in prod channel and it is available for all users for now. Also I published an instant app for this application (also prod channel).

But it's not opening when I clicking the links, it's opening in chrome browser instead. I know that my device has instant app setting on and can open other link as instant app, for example buzzfeed.

When I'm trying to open my link I can see this in logcat:

10-11 10:39:29.336 3588-4026/? I/ActivityManager: START u0 {act=android.intent.action.VIEW dat=https://instant.isdev.info/... cmp=com.android.chrome/com.google.android.apps.chrome.Main (has extras)} from uid 10097
10-11 10:39:29.483 18862-18862/? I/cr_InstantAppsHandler: Disabled for Android O+
10-11 10:39:29.488 3588-18005/? I/ActivityManager: START u0 {act=android.intent.action.VIEW dat=https://instant.isdev.info/... flg=0x14002000 cmp=com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity (has extras)} from uid 10053

My application is google play link.

My website is link.

My assets link json file is link. It was generated by Android studio App link assistant with my app id and release keystore.

My link which should open instant app is link.

My manifest for this link is:

<data android:scheme="https" />
<data android:scheme="http" />
<data android:host="instant.isdev.info" />
<data android:pathPrefix="/details" />

Also my instant app works well if I manually install it using this adb script from google samples readme file. It's opening an instant app when I'm clicking my link and the application marked as Instant Application in settings in application manager.

cd instant/build/outputs/apk/debug # navigate to build dir
unzip instantapp-debug.zip # extract apks

adb install-multiple -r -t --instantapp *.apk # install apks

# launch entry point; you'll have to replace $(SAMPLE_ENTRY_POINT)

adb shell am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d $(SAMPLE_ENTRY_POINT)

cd - # takes you back to the root directory

I don't know what to do. I tried almost everything. As you can see I even published application to prod. But it's still not working. Thanks for any help.

Prags
  • 2,457
  • 2
  • 21
  • 38
Kulibin
  • 444
  • 4
  • 12
  • I was able to launch your instant app via https://instant.isdev.info/details just fine (on Nexus 5X Android O, also Pixel N). Could you remove your IA from your device and clear Google Play Store and Google Play services cache, then try to launch your IA again, a few times. That “Disabled for Android O+” message can be ignored. – Julia K Oct 11 '17 at 17:39
  • Thanks for your help @JuliaK. Unfortunately, I still can't launch my IA event after clearing cache, disabling/enabling Google Play Store and Google Play services :( – Kulibin Oct 11 '17 at 19:13
  • @Kulibin you can also try to disable/reenable Instant App setting and clean the Google Chrome cache, sometimes it helps. – Volo Oct 12 '17 at 10:30
  • Thanks @Idolon. I tried, still no results... – Kulibin Oct 12 '17 at 12:38
  • @Kulibin Check the Google Play Console if you by any chance have some countries disabled for Instant Apps distribution: https://stackoverflow.com/a/45565518/648313 – Volo Oct 12 '17 at 15:15
  • @Idolon. I don't have any countries disabled for regular app and for instant app. Also I have "Mobile holdback = 0" which means all users should be redirected to IA. – Kulibin Oct 12 '17 at 19:01
  • @Kulibin Can you give disable/reenable one more try? There was a similar issue in the following thread which was eventually fixed with reenabling IA option trick: https://stackoverflow.com/questions/46714709/instant-apps-not-working-on-any-pixel-xl-devices#comment80382576_46714709 – Volo Oct 17 '17 at 19:48
  • Do you have `android:autoVerify="true"` as part of then intent filter? – Lyla Nov 10 '17 at 22:02
  • @Kulibin did you resolve this issue? I am also having the same issue. – sam33r Dec 30 '17 at 03:02
  • @sam33r no, my app works fine on some devices, but not working on my nexus 5x and some other devices :( – Kulibin Jan 02 '18 at 11:07
  • It says here "Android Instant Apps is currently only available on some devices." https://support.google.com/googleplay/answer/7240211?hl=en – ecle Mar 23 '18 at 16:21

0 Answers0