Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to discover and run third-party Android Instant Apps on an emulated device?

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.

  • I'm in Australia, which should be one of the countries where Instant Apps are supported.
  • As suggested in one answer, I've tried sending links that should open in instant apps in emails and then clicking on them, but it still just sends me to a browser link.
  • The answer about DAL verification is interesting, but doesn't seem like it should apply when opening links in a browser?

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:

  • My development machine runs Windows 10 (not by choice)
  • The emulated devices are Nexus 5x (API 24 and 26) with Play Store
  • I also tried the "x86" images, since some people recommended them for Windows, but they didn't work either. (This may be because the "x86" images don't come with Play Store, which I think is required for Instant Apps?)
  • I'm logged into a real Google user account on the emulated devices.

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

like image 240
Rapunzel Van Winkle Avatar asked Aug 02 '17 10:08

Rapunzel Van Winkle


People also ask

What does the emulated device for an Android application do?

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.

How do I deploy an instant app?

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.

How do I find third party apps on Android?

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.


1 Answers

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.

like image 120
dchai Avatar answered Sep 30 '22 14:09

dchai