Mohamed El Aaboudi
Mohamed El Aaboudi

Reputation: 11

Firebase cloud messaging crashes when receiving notification

Hello there guys i have this problem today with fcm i was using it before works fine but now i am getting this errors

firebase cloud messaging, debuger https://dpaste.de/DpeH MyFirebaseMessagingService java https://dpaste.de/hRVk

thanks for your help

Upvotes: 0

Views: 889

Answers (3)

Bhushan
Bhushan

Reputation: 21

Please check the data is available or not in the onMessageReceived().

Upvotes: 1

android_jain
android_jain

Reputation: 798

you r reciving data is null or data is not there so when notification ifs atemping data as a sting there is null object so app crash

Upvotes: 0

Ramesh
Ramesh

Reputation: 47

When you received the data from the FCM for the notification, then you need to verify whether data is present or not. If you are directly accessing the object instead of checking whether the data is present or not then the App will crash.

Thanks

Upvotes: 1

Related Questions