I have implemented Firebase Authentication, Realtime Database and Analytics in my app. If the app is started and remains idle on certain phones, it throws an ANR message.
Logcat shows:
E/ActivityManager: ANR in com.demo.droid
PID: 16376
Reason: executing service com.demo.droid/com.google.android.gms.tagmanager.TagManagerService
Load: 8.5 / 8.88 / 8.98
CPU usage from 3255ms to -2309ms ago:
Is there any way to catch this error before it is thrown on screen?