2

I've run a hello world instant app on an emulator following this Google's tutorial.

Everything worked well, I got the dialog asking for permission to enable instant apps and clicked 'I'm in'. After that, I could also see that instant apps were enabled in Settings > Google > Instant Apps.

But when I open my browser, run a search and click on links from websites that already have published instant apps, such as BuzzFeed, NY Times Crossword and Wish, they just open the regular web page.

I found out those apps watching Google IO 16 and 17 presentations about instant apps. I even tried the link https://www.buzzfeed.com/tasty, featured on this keynote, to no avail.

I suspect that's due to the fact that the current supported emulator doesn't come with Play Store built-in.

I'm also in a country(Brazil) where Instant apps are not supported yet according to this list. But I'm not sure if that impacts on the emulator.

Does anyone know if those are indeed the reasons why I can't check out instant apps already published on Play Store?

Mateus Gondim
  • 5,362
  • 6
  • 31
  • 51
  • Are you typing the URLs directly in the browser or clicking on these links from another source like Gmail, Messenger, etc? Also, which device are you using to test? – Maru Ahues May 31 '17 at 20:58
  • I've tried typing the urls directly in the browser and also doing a search first, then clicking a link in the results. I'm using the emulator Nexus 5X image running Android 6.0 (API level 23), x86, with Google APIs. As recommended here: https://developer.android.com/topic/instant-apps/getting-started/setup.html#setup-emulator – Mateus Gondim May 31 '17 at 21:19

3 Answers3

3

Since Brazil is not currently in a list of Android Instant Apps supported countries, this feature is turned off on the real devices, but emulators can still be used for Instant Apps development and testing.

Production level applications, like BuzzFeed, can be launched through Instant Apps only in countries from this list: https://support.google.com/googleplay/android-developer/answer/7381861#production. In all other countries, Instant App URLs like https://www.buzzfeed.com/tasty will proceed to the website, regardless if you’re using a real device or an emulator.

Julia K
  • 561
  • 5
  • 11
1

There are possibly two reasons. I recommend following the guide here to set up your emulator. Once you've confirmed that instant apps is enabled successfully via adb shell pm list packages | grep "com.google.android.instantapps.supervisor" and it is enabled in Settings->Google->Instant Apps, then try sending the link as an email to the emulator.

I've found that clicking links within the browser will often times keep you in the browser. But opening the link from Gmail always works for me. I've just checked that it works with Vimeo not too long ago - https://vimeo.com/190063150.

Kyle Venn
  • 4,597
  • 27
  • 41
  • Eveything seems to be correctly set up, I even get this notification on my emulator: "URLs will be routed to Dev Manager in order to launch Instant Apps locally...". I don't have the gmail app on my emulator, but just tried using the Messaging app, sending messages with links then clicking on them. Tested with your vimeo link, buzzfeed and nytimes crossword but none work. All of them just open the web page. – Mateus Gondim Jun 08 '17 at 14:06
  • I'm in a country where instant apps are not available yet(Brazil) according to this list: https://support.google.com/googleplay/android-developer/answer/7381861#production. Do you think this might be impacting the emulator? – Mateus Gondim Jun 08 '17 at 14:07
0

I believe you can't have instant apps for any arbitrary link due to DAL verification. It should be the link of the domain that you own.

https://developer.android.com/topic/instant-apps/getting-started/index.html#app_links

For instant apps, you must set the android:autoVerify attribute to true in all elements. This attribute tells Google to verify your app link with a Digital Assets Links (DAL) file that is hosted on your website and prevents apps from linking to domains that they do not own.

https://developer.android.com/topic/instant-apps/prepare.html#app-links

datalost
  • 3,765
  • 1
  • 25
  • 32
  • I agree with that, but I'm not trying to use links from other websites on my app. What I'm saying is that if I open my browser and type https://www.buzzfeed.com/tasty or google for "NY Times Crossword" like in [this keynote](https://youtu.be/EtQ8Le8-zyo?t=1314) and click on the links returned, I don't get any instant apps. – Mateus Gondim May 30 '17 at 11:02