Android emulator not receiving push notifications

AndroidPush NotificationGoogle Cloud-Messaging

Android Problem Overview


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.

Android Solutions


Solution 1 - Android

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

Solution 2 - Android

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

Solution 3 - Android

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

Solution 4 - Android

Ensure you connected a google account on the emulator

Solution 5 - Android

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

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionChristopher LawlessView Question on Stackoverflow
Solution 1 - AndroidifloritView Answer on Stackoverflow
Solution 2 - AndroidDavid DouglasView Answer on Stackoverflow
Solution 3 - AndroidVictor MwendaView Answer on Stackoverflow
Solution 4 - AndroidfrapetiView Answer on Stackoverflow
Solution 5 - Androidصلي علي محمد Atef FaroukView Answer on Stackoverflow