Android emulator not receiving push notifications
Solution 1
Which target have your emulator? For Google Services like GCM, use a "Google APIs" (any version) target to receive push notifications
Solution 2
Edit your Android Virtual Machine (AVD) Target to use 'Google APIs' to enable GCM Push Notifications to be received by the emulator.
Solution 3
Was your emulator receiving Firebase push notifications before? If yes, force reboot your emulator.
Solution 4
Ensure you connected a google account on the emulator
Christopher Lawless
My Github : https://github.com/lawlessc Blog : http://this-better-work.blogspot.com/
Updated on July 09, 2022Comments
-
Christopher Lawless almost 2 years
I'm using push notifications on google cloud, however for some reason i cant receive push notifications on the emulator.
The same application does receive notifications when i test it on a real device however.
Has anyone else encountered this or found solutions to it? the emulated device has net access and is the same android version as the real one so i cant think of any reason it shouldn't work.
-
iflorit over 10 yearsAnd there is any google account set in your emulator?
-
iflorit over 10 yearsIs your Android project compiled using a Google APIs target too? I think is necessary for testing
-
Christopher Lawless over 10 yearsit is now, didn't help unfortunately, i'll keep plugging away maybe i'll find something.
-
Christopher Lawless over 10 yearsI wasn't using the Google API that was the issue, i was trying to use an intel build for the hardware acceleration if provides but because this didn't exist for the Google API android build the AVD manager was defaulting back to the Android core API, something i hadn't noticed.
-
faizal over 9 yearsHow did you get the "Google APIs" target? I don't see it on the latest Eclipse with latest ADT plugin.
-
David Douglas over 9 yearsTry installing additional APIs using Android SDK Manager. You will also need Google Play Services installed. I have a video showing this youtube.com/watch?v=Zx78vrELgXk
-
faizal over 9 yearsahh thanks. nice video. I had never noticed the Google APIs system images in the SDK manager.
-
Teoman shipahi over 8 years@DavidDouglas you should mention as "Google APIs system images" there will be more clear. There is also "Google APIs" listed which is confusing.
-
Vinicius Lima almost 8 yearsAlso don't forget to add in your app gradle the following: apply plugin: 'com.google.gms.google-services'
-
Akash Gorai about 2 yearsAny alternative resolution besides force reboot?