50
votes

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.

5
Silly question, but you've logged into your google account on the emulator?fantasitcalbeastly
Yes though it might be mail be mail only?Christopher Lawless
Figured it out, They can receive push notifications, just make sure you used the google api and have a google account connected.Christopher Lawless
Funny thing mine only works on emulator and not on the real phones!Alex Jolig

5 Answers

31
votes

Which target have your emulator? For Google Services like GCM, use a "Google APIs" (any version) target to receive push notifications

23
votes

Edit your Android Virtual Machine (AVD) Target to use 'Google APIs' to enable GCM Push Notifications to be received by the emulator.

enter image description here

13
votes

Was your emulator receiving Firebase push notifications before? If yes, force reboot your emulator.

7
votes

Ensure you connected a google account on the emulator

0
votes

If you reach her, then you can try this answer.

Noting that no need to login in emulator with any google account.