I'm currently trying to learn about Android instant apps. Since I don't own any real devices that support them, I'm using the emulator (from Android Studio 3.0 Canary 9). I can successfully run "toy" instant apps (like this) on my emulated Nexus 5x (with Play Store), so I believe that my development environment is configured correctly.
However, I was curious to learn about the discovery process for third-party apps, and find out what the user experience is like. Lacking a suitable device of my own, I used the emulated Chrome browser to search for sites (like Stack Exchange) that have instant apps enabled. But these searches only give me the usual websites (not instant apps).
I read this post with great interest, because it seems to suggest that this should work. However, those answers didn't seem to help me.
The API 24 and API 26 emulated devices (both of which include the Play Store) are currently in somewhat different conditions, probably because I've been trying all sorts of tricks to make it work. (TLDR: Nothing's working for me.)
On the API 24 emulated device, if I type adb shell pm list packages grep "com.google.android.instantapps.supervisor"
then it outputs package:com.google.android.instantapps.supervisor
as one answer suggests (but it still doesn't work).
The API 24 device has Google Play services for Instant Apps (version 1.9-sdk-155682639)
installed.
The API 24 device has a "lightning bolt" notification at the top of the screen saying "Development Mode Active": URLs will be routed to Dev Manager in order to launch Instant Apps locally. Uninstall Dev Manager to disable Development Mode.
On the API 24 device, Settings -> Google -> Instant Apps, instant apps is set to true
On the API 26 emulated device, if I type adb shell pm list packages grep "com.google.android.instantapps.supervisor"
returns nothing
On the API 26 device, Google Play services for Instant Apps
isn't installed, and there isn't any "lightning bolt" notification either
On the API 26 device, Settings -> Google doesn't list Instant Apps (so there's nothing to set)
Here are some additional details, in case they're relevant:
With the development environment I've set up now, I can continue to develop my own instant app, deploy it on my own emulated devices, and test it. I was really just curious to see how other people's instant apps work. And another post (linked above) suggested that I should be able to do this.
So here's my question: Is it possible to discover and open third-party Instant Apps on an emulated device (and if so, how)?
High fidelity: The emulator provides almost all of the capabilities of a real Android device. You can simulate incoming phone calls and text messages, specify the location of the device, simulate different network speeds, simulate rotation and other hardware sensors, access the Google Play Store, and much more.
Step 1: Enable Instant apps First, you need to add Google Play Instant as a release type and ensure that it's active. Open Play Console and go to the Advanced settings page (Release > Setup > Advanced settings). Select the Release types tab. Click + Add release type and select Google Play Instant.
Go to the Security section of your Google Account. Under “Third-party apps with account access,” select Manage third-party access. Select the app or service you want to review.
Is it possible to discover and open third-party Instant Apps on an emulated device (and if so, how)?
At present, no. :( There are security restrictions in place preventing emulated devices from using various Google services. If you check the log, you might find a message similar to "io.grpc.StatusException: INVALID_ARGUMENT: Application credential header not valid. Please fix the client to pass a valid application credential header."
On the API 26 emulated device, if I type adb shell pm list packages grep "com.google.android.instantapps.supervisor" returns nothing
FYI, Supervisor isn't used for Android O.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With