So, I have integrated FCM with version 9.6.1 all works fine but the problem is My android vitals showing crashes for every time user opens the app. But this crash is not visible to users neither it is being caught in log cat of android studio
1
votes
You should add more information about the crash that android vitals is showing.
– Vedprakash Wagh
Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { act=com.google.firebase.INSTANCE_ID_EVENT pkg=com.seattleapplab.trymyui cmp=com.seattleapplab.trymyui/.Service.MyFirebaseInstanceIDService (has extras) }: app is in background uid UidRecord{26cc21 u0a174 RCVR idle procs:1 seq(0,0,0)}
– Mahesh Marapalli
@VedprakashWagh please refer the above comment
– Mahesh Marapalli
first update your fcm version
– BlackBlind
ok got your point but my question was why this same log is not showing in logcat of my android studio
– Mahesh Marapalli
1 Answers
0
votes
From the crash report that you've attached in your comment, I can see that you're using deprecated FirebaseInstanceIDService
. Using that in your app will crash the app. In order to fix the error, follow the steps mentioned below:
Update your Firebase Libraries to the latest ones from
app/build.gradle
.Change your
FirebaseInstanceIdService
to the latestFirebaseMessagingService
and handle the notification handling in theonMessageReceived
as well as other stuff inonNewToken
You can check out how to migrate from FirebaseInstanceIdService to the latest one from the following few articles.