Recently my Pixel started showing the following message:
Development Mode Active -
URLs will be routed to Dev Manager in order to launch Instant Apps locally.
Also, in settings -> apps I can see Google play services for Instant apps.
Now, when I tried wish and buzzfeed tasty so that I can run their Instant apps I was taken to their site and not in the Instant app.
I built an Instant app in Android Studio 3.0 Canary 4.
It is working fine on the emulator but when I connected my Pixel running on android 7 it shows the following error -
Side loading instant app failed: Reading bundle timed out.
and when I retry some more times it shows this -
Side loading instant app failed: Failure when trying to read bundle.
Unable to connect to Google Play Service ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
A same question has been asked here but in this case the problem is with the emulator not a real device.
CompiledSdkVersion 25 targetSdkVersion 25 buildToolsVersion 25.0.3
Any help would be appreciated and also a list of some already published instant apps I can try.
Unfortunately Instant Apps is not yet available in India. That means, Instant Apps features are by default turned off on the real devices, including in development environment. See the list of supported countries here: https://support.google.com/googleplay/android-developer/answer/7381861#production
We are working on this issue and will provide an update in a few weeks. In the mean time, please use emulators for you development.
In your instant App run configuration.
Try To enable Instant APP Provision and "Clear Provisioned Devices Cache"
Now Instant apps is available in India.
You can check by searching buzzfeed tasty in chrome.
Attaching screenshot below
Or you could visit https://developer.android.com/topic/instant-apps/index.html and click the screenshot on that site. Post clicking website will open. Below that website a popup will show to "open app". Post clicking "open app", instant app will get opened
Note : Turn on instant app in Google menu in Settings in phone before trying above
Related
I'm running android emulator with a virtual device API version 21 (also same testing on 22) because apparently my processor, AMD Phenon II x6 1055t, is not supported by google anymore as I have researched here on SO. Indeed creating a device with version 21 or 22 successfully made the emulator open and boot the virtual device OS.
Now my problem is that the app I'm developing does not open, it either crashes or freeze during load.
This is not unique to the app I'm developing, maps, settings, and the sample project from android studio also do not open. For maps and settings I see the message that google play services stopped working.
BTW if I reboot the device, this message that google play services stopped working floods with popups for about 2 minutes until it stops after that time.
I have captured the error messages by running the emulator with this command: emulator #Pixel2_21 -logcat '*:v'
and pasted the complete log here: pastebin.com/acgF6A8K
I can provide more logs if someone instructs me on how to do so.
I wonder if shows any clues or if I'm still at a stage that it could be anything
Thanks in advance
Update 1.
By selecting another image that does not include google API I was able to launch some of the native apps that were not loading before. Same API version 21, just selected another one that do not include the google API.
The app I'm developing still does not load though
Update 2
See the link below for more info on specific compatibility for my processor related to the Android OS API versions:
https://issuetracker.google.com/issues/37076174
I have One instant app project, which after few hurdles I was able to run on the emulator (Nexus 5X API 26)
Android: Instant app showing just white screen
Now, after 2 months I am trying to run the same project but its not working out
Nexus 5X(Any api):
Adb devices give the following result
emulator-5554 unauthorized
Pixel APi 24 :
Side loading failed with message: Failure when trying to read bundle.Unable to connect to Google Play services. ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null}
Physical Device's :
Provision failed with message: The device used is not whitelisted for Instant Apps deployment.
As per doc's Instant apps work on
Most Android devices running Android 5.1 (API level 21) or higher.
Devices that I have tried on
Mi Redmi Note 3(marshmallow)
Moto G4 plus (Nougat)
Android studio version 3
How can it be made to work?
Pixel API 24 emulator:
You need to install an Android system image that have Google APIs. You can see those images while creating new emulator, they have a name like: "Android 7.1.1 (Google APIs)".
Make sure you have the latest version of Google Play Services in your emulator. To do that: go to emulator's extended controls (by clicking three dots) -> Google Play -> Update. Note that this only visible if you install a system image with Google APIs (see step 1.)
Make sure you enabled Instant Apps on your device/emulator. See: https://support.google.com/googleplay/answer/7240211?hl=en
Physical Device:
Only few selected devices (such as Pixel) are compatible with Instant Apps development.
See: https://github.com/googlesamples/android-instant-apps/issues/1
See the developer documents about setting up device or emulator for Instant Apps development.
I am converting my existing application to Android Instant App. I have successfully done that. My app is running in Instant App form. The issue that I am facing now is regarding Firebase-Analytics. When I run instant app I get this error
E/FirebaseInstanceId: Failed to resolve target intent service, skipping classname enforcement
E/FirebaseInstanceId: Error while delivering the message: ServiceIntent not found.
When i try to get FirebaseAnalytics instance using FirebaseAnalytics.getInstance(this); the instant app crashes. I am not able to get any sort of logs on Logcat. My "Installed" app is working perfectly fine. Also if someone can guide me on how to debug Instant Apps, I am not able to debug them or even get logs on Logcat.
Edit
Link to Bug Report
Google Play services for Instant Apps 2.7-release-179555567
With Reference to Google issue tracker
Your Google Play services for Instant Apps version is 1.22...
If you update to the latest, it should be fixed with: 2.7+
Uninstall Google Play services for Instant Apps
Go back to Settings > Google > Instant Apps
It will ask you to restore it > RESTORE
Now try running your instant app again.
If you are experiencing this while trying to build your instant app from Android Studio, you may have to repeat steps 1-4 one more time. On first provisioning, it may install your device with the incorrect version (1.22...), but afterwards, it should be the correct version.
That solved my problem but will users always have the latest Google Play services for Instant Apps (i.e. 2.7+)? As I didn't side load Google Play services for Instant Apps or was it installed by Android Studio?
Ans:-
Yes, users on pre-O should be periodically pushed the latest Google Play services for Instant Apps. Plus, they can always perform steps 1-3 to make sure they get the latest.
On O+, they shouldn't have to do anything either, since Instant Apps support is built directly into the framework from here on out.
Working with the OEMs, Google Play services for Instant Apps have been pushed to all devices which have been deemed compatible for Instant Apps. The other case is where Android Studio installs it when you try to build your instant app to a whitelisted device.
I am new to running instant app. I have created a new "Hello World" project with instant app support, according to android developer documents.
But, when running "instantapp", the following error occurs:
I would appreciate it if anyone could help.
Note: There is a known issue running Instant Apps on the emulator image that includes the Google Play Store which will give this same error. For now, please use the emulator without Play Store.
Google Play Services giving statusCode=API_UNAVAILABLE means your device is not able to run Instant Apps for one reason or another. For example, you are not using a supported device or you are not in a launched country. Please see here for a list of supported development devices and here for a list of countries Instant Apps are available in.
The emulator should still work for development and will run outside of any restrictions. For instructions on setting up an emulator for Instant App development see here:
https://developer.android.com/topic/instant-apps/getting-started/setup.html#setup-emulator
Is it possible to disable in-app billing/purchase and test my application on an Android Emulator? I want to do some functional testing of my application on multiple emulators.
Later on I would test the 'in-app billing' on a real device.
Anyone have experience?
How should I do this?
From Google:
http://developer.android.com/guide/market/billing/billing_testing.html
To test in-app billing in an application you must install the
application on an Android-powered device. You cannot use the Android
emulator to test in-app billing. The device you use for testing must
run a standard version of the Android 1.6 or later platform (API level
4 or higher), and have the most current version of the Android Market
application installed.
Update 2022
Recently re-checked:
Even if we Emulate a system-image which targets Google-Play (instead of Google APIs),
update Google-play services to latest,
and follow the "Goole Wallet" app's and/or "Google Pay" app's add-credit-card form till end successfully.
Said App instead of adding credit-card as payment-method, just shows message:
Note that the message is confusing, as we were trying to add credit-card, and did not try to use "Tap to Pay".
Install an emulator that has already google playstore installed, on a system image that supports google service api
My emulator spec:
Pixel 3a API 31
ABI: x86_64
System image: Android API 31 (Google Play)
Create a closed testing track in google playstore console
Add your gmail to license testing and closed testing email list
Wait for your closed testing to be approved and available for testers.
If you're using an existing emulator, please wipe data and cold boot
Login as a tester account in gmail app as the first thing when you launch the emulator
Browse closed testing invitation url, and accept invitation to take part in closed testing track
IMPORTANT Make sure you're using the same application id (e.g. com.your.company.app), version code (e.g. 1.3.0) and version name(a.k.a build number) as the closed testing binary.
That's all. Test payments in the emulator.
For step 2 ~ 4 you can refer to this wonderful doc from revenue cat: https://docs.revenuecat.com/docs/google-play-store