Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Empty registrationId Android #265

Closed
brambogaerts opened this issue Oct 26, 2015 · 9 comments
Closed

Empty registrationId Android #265

brambogaerts opened this issue Oct 26, 2015 · 9 comments

Comments

@brambogaerts
Copy link

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
Copy link
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
Copy link
Author

@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
Copy link
Author

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

@macdonst
Copy link
Member

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

@brambogaerts
Copy link
Author

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
Copy link
Member

Closing, re-open if you can reproduce.

@thomasjonas
Copy link

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
Copy link
Member

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

@lock
Copy link

lock bot commented Jun 5, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants