-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Android push.on('registration', cb) fires correctly on device, but not in emulator. #204
Comments
@alexklibisz Hmm, I always thought that push did not work on the emulator but check out this link and report back if this solution works for you: |
@macdonst thanks for the quick response! I will try that. It has definitely worked for me in the past, but I recently had to re-install android SDK/studio/emulator and didn't document the working config I had before :/ I'll try later today and post back results. |
@alexklibisz Sounds great, if this does work for you please close this issue. |
@macdonst It did indeed solve the problem! Thank you for the pointer! More specifically, here are the steps I followed:
This is of course on top of the other packages I had installed. Thanks again for the pointer. |
Closing the issue, see the stackoverflow post linked by @macdonst and my details in the previous comment for resolution. |
@alexklibisz thx |
This thread has been automatically locked. |
Is there any reason that this plugin would not work in an Android emulator but work on an actual device (using the same APK file)?
I'm using Cordova/Ionic to build an angular-based app. I began using the push plugin suggested by the ngCordova project: ttps://github.com/phonegap-build/PushPlugin.git, but I had problems with it, and it's deprecated, so I've switched to this one.
When I run my app on an Android Emulator (the default Android Emulator, on Linux), the push.on('registration') callback does not fire at all. When I build and run on my device (HTC One), it fires correctly. Here is my rather straightforward registration code, which is run after 'deviceready' event:
I have the following Android packages installed:
Thanks
The text was updated successfully, but these errors were encountered: