Can't receive Firebase Notifications on emulator behind proxy - android

I can't receive firebase notifications on emulator behind proxy
But if I install the apk on an android device and then send a notification it is received.
I am using API 27 x86 image emulator.
App is compiled against API 27 with Target as well 27.
Any thoughts?

If you are building your app with version 11.8.0 of the Firebase SDK, the problem is likely caused by the emulator image not having a compatible version of Google Play services. The latest API 27 emulator image does not support 11.8.0
Look in the logcat at the time the app initializes for this warning: W/GooglePlayServicesUtil: Google Play services out of date. If you see that, the simplest option is to run with an API 26 emulator image, which supports 11.8.0.
The FCM setup instructions in the documentation explain that apps built with Firebase should check for a compatible version of Google Play services.

Related

Unable to run Google map in application running in Emulator

I am receiving error:
AppName won't run unless you update Google Play services.
Update
Emulator is not showing option for updating Google Play Services.
Configurations
Emulator:
Android 8.1 (Oreo)
Google APIs Intel x86 Atom System Image.
Following is installed:
Build tools 27.0.3
Android Emulator 27.2.0
Google Play Services (Version 48)
Android Studio 3.1 Canary 9 running on Ubuntu.
Tried many solutions on this website but no success.
You Use That Emulator Which have Playstore Like this shown in Image.
Now even better solution exist: using AVD image with build-in Google Play Services. It will enable you to use Google Services including Google Play. Also you will be able update it without re-creating AVD image.
For further information check this post
https://www.google.com.pk/url?sa=t&source=web&rct=j&url=https://stackoverflow.com/questions/14536595/how-to-download-google-play-services-in-an-android-emulator&ved=2ahUKEwjwz76G5u7ZAhUMCuwKHdVFAH4QFjADegQIBxAB&usg=AOvVaw1NNhhmar8bv8PoXT5o9B0q
You must have an Emulator with Google APIs included. Depending in the version of Google Play Services libraries used in your project you may require a higher API level emulator with Google API included.
An emulator with Android 8.0 (API level 26) with Google API (Google Play) included should be enough.
Like this image

Android Emulator stuck on "Google Play Services are Updating"

I recently began learning how to create Google Maps activities in Android app development, and have stumbled onto an issue with Google Play Services. Whenever I set my gradle build dependency to compile 'com.google.android.gms:play-services-maps:11.0.4', which is the most recent version of play-services-maps, the emulator screen gets stuck on the following view upon running my maps app:
I have allowed the app to sit there for over an hour, and nothing has changed or updated. As I've read in other StackOverflow questions, I can get the app to properly function by setting my gradle build dependency to an older version, such as compile 'com.google.android.gms:play-services-maps:9.0.0', but this limits my ability to use newer Android features and APIs in my apps, such as FusedLocationProviderClient.
I am running on Nougat 7.1.1, and have installed the following SDKs in an attempt to solve this Google Play Updating issue:
Android SDK Build-Tools
Android SDK Tools
Google Play APK Expansion Library
Google Play services
Support Repository > Google Repository
I haven't found any StackOverflow threads specific to this "Google Play services are updating" message. What can I do to resolve this issue?
Use API 24 or API 26 Android Emulator system images and you should be good to go. API 25 does not have the latest Google Play Store app pre-installed yet. Note on the screen shot that only these images are "Google Play" versions.
In addition to #Jamal Eason's answer, you may use Nexus 5 and Nexus 5X emulators which have Play Store. Check here. You may also try running on real android device connected via USB that supports google maps and having google play service installed.

firebase authentication error - "update google play services"

I have project with Firebase from google. First I done simple chat activity - only sending messages with this database. Everything worked fine. But now I'd like to add another activity with authentication via email/password. In the same project on the same database and android emulator now I get message:
"Update Google Play services : ChatApp won't run unless you update Google Play services"
I looked around on both Google and StackOverflow past few hours and have found some information. However, I have not got it to work.
I created Nexus 5X emulator with API 25 and Target: Android 7.1.1(Google APIs) x86 and second Nexus 6 with CPU/ABI x86_64. Google Play services on both are in version: 9.8.79 and I use auth in version 10.0.1. I try to create new emulators, I updated everything as here was said I changed in Firebase settings ability to log via e-mail.
Really makes me wonder why everything worked previously and now with authentication is not.
I'm relatively inexperienced in Android development.
Thanks in advance.
At the time of this writing (Jan 20, 2017) the API level 25 emulators have a fairly version of Play services. If you want to use the latest client library version 10.0.1, you should use an emulator image that targets API level 24 instead.
The general rule is that the version of Play services on the device should be greater than or equal to the version of the client libraries you want to use. Therefore, the version 9.8.79 you see on the API level 25 emulators won't work with 10.0.1 client libraries. However, version 10.0.84 of Play services available on API level 24 should work fine.
The version of Play services available for emulators only updates when you there is a tooling update. There isn't a Google-sanctioned way of updating an existing emulator image with a new version of Play.

Google Play services out of date. Requires 10084000 but found 9879470. Can't update

I am making an android app with Firebase. These are the lines causing problems:
dependencies {
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
I get this error:
Google Play services out of date. Requires 10084000 but found 9879470.
I run the app on an emulator. It doesn't seem possible to update GPS on the emulator, since it doesn't have Google Play Store.
In SDK Manager, it says the version of Google Player services is 38.
There is no apparent way to update this either.
Updated 28 Feb 2017: Rev 4 of the emulator images for API 25 has been released and is available for download. It contains Google Play Services 10.2.98, which supports Firebase 10.2.0.
An emulator system image that supports Firebase 10.0.1 has not yet been released for API 25. The Rev 19 system image for API 23 does support 10.0.1.
You have three options:
Wait for release of an API 25 emulator system image that supports 10.0.1
Create an emulator device using Rev 19 of the API 23 system image. In the Standalone SDK Manager, the emulator images are grouped by API and have names like, "Google APIs...System Image". Make sure you have Rev 19 installed.
In your build, downgrade to a previous version of Firebase to allow use of the API 25 emulator image.
When running the emulated device, you can see the version of Google Play Services installed by going to Settings > Apps and selecting Google Play Services.
I just solved it by changing the version of the dependencies. just use:
compile 'com.google.firebase:firebase-core:9.6.0'
compile 'com.google.firebase:firebase-auth:9.6.0'

How to update Google Play Services on the emulator in Android Studio

Hi I am trying to run an Android Program I have created that can connect to Firebase with Authentication using email and password but it seems that I cannot even authenticate due to the fact of them saying my Google Play Service is not up to date.
I am stump here as I have the latest google play services according to my SDK manager
and I don't think it is my code's problem as when I use my friend's phone for debugging it works but not when I am using the emulator.
How can I update my google play services in the Android Studio built-in emulator.
Since Google introduced Google Play Store images in Android SDK Tools 26.0.0 now emulators comes with installed Google Play Store.
When creating Emulator use images that support Google Playstore (currently Nexus 5 and Nexus 5x with android O)
From 26.0.3
Adds a new tab in the extended window for Google Play Store images that displays the Play Services version and a button to check for updates to Play Services.
Edit:
Make sure that you use emulator with playstore is installed. Check if you have sdk manager -> sdk platforms -> Android 8 -> Google Play ... system image installed. Download it. Create new emulator using that image.
I had the same issue and spent half a day working it out.
In your emulator, go to settings->apps->Google Play Services and compare the version used to what appears in your build.gradle file.
In my case the emulator was running an earlier version and no amount of updates seemed to change it.
In build.gradle, I changed the following:
compile 'com.google.android.gms:play-services:9.6.1'
to
compile 'com.google.android.gms:play-services:8.+'
After which I restarted android-studio and it worked flawlessly.
I was facing same issue, but i downgrade my play services version in build.gradle.
settings->apps->Google Play Services application check image
my google play services version is 10.2.98, that's why we need google-play-services(in module level build.gradle) version lower than our emulator's library version.
set the lower version from here, we can see 10.2.6 is better and set it in build.gradle like this
compile 'com.google.android.gms:play-services-places:10.2.6'
and just simple, run app again.
Try to download and install the latest APK for Play Services as stated in this thread.
Based from Google documentation,
If you want to test your app on the emulator, expand the directory for Android 4.2.2 (API 17) or a higher version, select Google APIs, and install it. Then create a new AVD with Google APIs as the platform target.
Try to navigate to settings--> apps in your emulator and then find Google Play Services. Check the version number and use it in you build.gradle. To update it with the latest version, you can see it in these documentation and SO question.
Be noted that updates might not reach all users immediately, so your app should verify the version available before attempting to perform API transactions.

Categories

Resources