Android emulator not receiving push notifications

69,985

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.

enter image description here

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

Share:
69,985
Christopher Lawless
Author by

Christopher Lawless

My Github : https://github.com/lawlessc Blog : http://this-better-work.blogspot.com/

Updated on July 09, 2022

Comments

  • Christopher Lawless
    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
    iflorit over 10 years
    And there is any google account set in your emulator?
  • iflorit
    iflorit over 10 years
    Is your Android project compiled using a Google APIs target too? I think is necessary for testing
  • Christopher Lawless
    Christopher Lawless over 10 years
    it is now, didn't help unfortunately, i'll keep plugging away maybe i'll find something.
  • Christopher Lawless
    Christopher Lawless over 10 years
    I 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
    faizal over 9 years
    How did you get the "Google APIs" target? I don't see it on the latest Eclipse with latest ADT plugin.
  • David Douglas
    David Douglas over 9 years
    Try 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
    faizal over 9 years
    ahh thanks. nice video. I had never noticed the Google APIs system images in the SDK manager.
  • Teoman shipahi
    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
    Vinicius Lima almost 8 years
    Also don't forget to add in your app gradle the following: apply plugin: 'com.google.gms.google-services'
  • Akash Gorai
    Akash Gorai about 2 years
    Any alternative resolution besides force reboot?