onRegister the token null
See original GitHub issueHi, great package so far.
I have a question which is related with an issue: When i open the app for the first time (after install), the token is not generated. The token is null.
Which is the best approach to get the token if the onRegister method returns token as null? Do i have to recall this function in other screen of the app?
Please help me with some code examples. Maybe something like:
PushNotification.onRegister((token)=>{ console.log(token); });
Thanks, Mihai
Issue Analytics
- State:
- Created 6 years ago
- Comments:11
Top Results From Across the Web
onRegister token null IOS, Android ok #363 - GitHub
I have managed to get the token for iOS and Android devices, but I have a little issue: when I run for the...
Read more >React Native Push Notification onRegister token is null
My question is, which is the best approach to get the token if the onRegister method returns token as null? Do i have...
Read more >[Solved]-React Native Push Notification onRegister token is null
This problem was FCM.getAPNSToken() runs right after FCM.requestPermissions() , so application didn't get permissions for push notifications when method runs.
Read more >Developers - onRegister token null IOS, Android ok - - Bountysource
Platform: IOS, react native v0.40, push notify lastest onRegister = (token) => { token is null } but used PushNotificationIOS.addEventListener('register' ...
Read more >react-native-push-notification Code Examples - Snyk
... lastTokenRegistration = null; PushNotification.configure({ onRegister: async ... Called when Token is generated (iOS and Android) onRegister: (token) ...
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
Can someone please advise/help me how to proceed in my case?
@hugoh1995 Yup its already working… I use Reactotron for logging but somehow it doesn’t show the token… I just see it when I do console.log! I think its an issue on Reactotron… Thanks anyway…