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?
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.
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.
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