Android emulator not receiving push notifications

2019-01-18 01:26发布

问题:

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.

回答1:

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



回答2:

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



回答3:

Ensure you connected a google account on the emulator