I have specified the PushNotification configuration as above, but i'm not able to fetch the device token.
As far as I know, the onRegister should be fired. I would like to get the token, for server purpose and remote push notifications through GCM.
componentDidMount() {
PushNotification.configure({
onRegister: function(token) {
console.log( 'TOKEN:', token );
},
onNotification: function(notification) {
console.log( 'NOTIFICATION:', notification );
},
});
}
you need to setup senderID, this is the project number in your FB console, and run in a real device or use gennymotion but flash GAPS
I'm going to start putting together a trouble shooting guide i think. We keep getting the same questions over and over.
Okay, I'm using full configuration, with correct senderID, but didnt try a real device.
Can verify that with real device(android v. 5.1.1), correct senderID, I can fetch the token. :) Thanks
Most helpful comment
I'm going to start putting together a trouble shooting guide i think. We keep getting the same questions over and over.