onRegister is not being called
See original GitHub issueHi there,
I am using react-native 0.30.0
and react-native-push-notification 2.0.2
and an Android device and have set up everything like in the README but when I call
var PushNotification = require('react-native-push-notification');
PushNotification.configure({
onRegister: function(token) {
console.log( 'TOKEN:', token );
},
onNotification: function(notification) {
console.log( 'NOTIFICATION:', notification );
},
senderID: "MY GCM SENDER ID",
});
nothing happens (neither in logcat nor anything else).
Do you know what the issue may be or how to debug this?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:18
Top Results From Across the Web
onRegister is never called (on device) · Issue #678 - GitHub
I got iOS working, got the token, and saved to the back-end where I send remote push notifications. But for Android, onRegister is...
Read more >React Native onRegister event not working (iOS)
This function never gets called. It doesn't matter if I have requestPermissions:true or not PushNotification.configure({ onRegister: ...
Read more >react-native-push-notification Code Examples - Snyk
Use Snyk Code to scan source code in minutes - no build needed - and fix issues ... (optional) Called when Token is...
Read more >Working with API - AWS Amplify Docs
Push Notifications. Working with API. JavaScript is not supported on this page. Please select one of the following: React ...
Read more >When to use OnRegister versus other Component lifecycle ...
OnRegister seems to get called even when… ... the functions called during initialization and when/if they will be called in editor or not: ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi i am using ReactNative 0.31 and com.google.android.gms:play-services-gcm:8.1.0 with a valid project id but the onRegister callback is not triggering neither on the real device nor on emulator. This is what i have so far
Am i missing some thing ? BTW I am upgrading the application from 0.25 to 0.31 and it is working in the old application.
+1