My app is using Firebase Analytics and linked with BigQuery. I found in BigQuery log that sometimes my app kept logging engagement time event when the app seems to be inactive. The behavior can be divided into 2 patterns:
Pattern 1: App keeps sending user_engagement event every one hour after app inactive.
Pattern 2: App was inactive for a long time (>1 hour). But when user come back, my app sent the first screen_view event with incorrect engagement_time_msec = ~amount of time since app last active.
Anyone has any idea what I could do wrong in my app. Since Firebase Analytics is not open source, I have no idea how this behavior could happen.