App crashing on PushNotification.configure() -Android
See original GitHub issueI have configure the package as per the installation docs.
As soon as I call PushNotification.configure()
in componentDidMount(). The app crashes immediately.
PushNotification.configure({
// (optional) Called when Token is generated (iOS and Android)
onRegister: (token) => {
this.props.dispatch(saveDeviceToken(token));
console.log('TOKEN:', token);
},
// (required) Called when a remote or local notification is opened or received
onNotification: (notification) => {
console.log('NOTIFICATION:', notification);
},
// ANDROID ONLY: GCM Sender ID (optional - not required for local notifications, but is need to receive remote push notifications)
senderID: '422724865895',
// Should the initial notification be popped automatically
// default: true
popInitialNotification: true,
requestPermissions: true,
});
“react-native-push-notification”: “^3.0.2”, “react-native”: “0.53.3”, “react”: “16.2.0”
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:9
Top Results From Across the Web
Android app crashes when push notification is coming
From the logs: calling HauptActivity.changeMeldungGefahr(HauptActivity.java:221) leads to a null pointer. You should fix the Nullpointer ...
Read more >2.8.31 - Crash when opening a push notification and app not ...
I'm seeing a crash on app startup after opening a push notification. It only seems to happen when the app is not running...
Read more >App crash on startup when enable push notifications
Hello :slight_smile: I try to implement push notifications to my app but it won't work. I started with the android version, and that...
Read more >Developers - App crashing on PushNotification.configure() -Android -
I have configure the package as per the installation docs. As soon as I call PushNotification.configure() in componentDidMount(). The app crashes ...
Read more >Xamarin Forms Push Notification Integration App Crash (iOS)
1. There is no problem in implementation in android project. But the application crashes after the splash screen appears in the ios project....
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
I also got app crashing but when receiving notification
Anyone know how to fix this? Thank you
Same issue here. Has anyone solved it?