Empty registrationId Android #265

Closed
brambogaerts opened this Issue Oct 26, 2015 · 8 comments

Projects

None yet

3 participants

@brambogaerts

I am using Parse.com to send push messages to my Ionic app. Therefore, I am using their senderID.

var push = PushNotification.init({
    "android": {
        "senderID": "1076345567071"
    },
    "ios": {
        "alert": "true",
        "badge": "true",
        "sound": "true"
    }
});

The onRegistration event does fire for Android, but the registrationId field is empty, so I am unable to receive push notifications.

@macdonst
Member

@brambogaerts Don't use the senderID from Parse. Use the GCM one you had to provide to Parse.

https://github.com/phonegap/phonegap-plugin-push#pushnotificationinitoptions

@brambogaerts

@macdonst Thanks for your speedy reply. However, I have created a new app from scratch to test with, and used my own senderID I provided to Parse, and I still get the same results...

@brambogaerts

As I was looking through the log items, I found this:
E/PushPlugin: execute: Got JSON Exception TIMEOUT
Internet connection is working.

@macdonst
Member

@brambogaerts I am unable to reproduce your problem. Got a reproduction scenario/code I can look at?

@brambogaerts

Well, the problem fixed itself. Somewhere between cleaning all kinds of caches and reinstalling every part imaginable, I managed to get the correct ID. Thanks for your response!

@macdonst
Member

Closing, re-open if you can reproduce.

@macdonst macdonst closed this Oct 27, 2015
@thomasjonas

Colleague of @brambogaerts here... Since we have bad wifi reception in the space we're working we setup a wifi using OS X's Internet Sharing. Somehow this is related to this problem as we got a real registrationId when we connected to a proper router... @macdonst any idea how that could be possible?

@macdonst
Member

@thomasjonas sorry no. Networking is like black magic to me. Especially when you get into connection sharing and captive gateways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment