1
votes

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
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 commentMahesh Marapalli
first update your fcm versionBlackBlind
ok got your point but my question was why this same log is not showing in logcat of my android studioMahesh 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:

  1. Update your Firebase Libraries to the latest ones from app/build.gradle.

  2. Change your FirebaseInstanceIdService to the latest FirebaseMessagingService and handle the notification handling in the onMessageReceived as well as other stuff in onNewToken

  3. You can check out how to migrate from FirebaseInstanceIdService to the latest one from the following few articles.

FirebaseInstanceIdService is deprecated.

FirebaseMessagingService crashes on Android 8.0