Dmytro Sirant
Dmytro Sirant

Reputation: 471

How Firebase Analytics handle session duration for background activity (mp3 player)

I understand how Firebase Analytics counts session duration if application in foreground, but what if my application gives some services to user (playing mp3) which I want to count as a session ? Is it counting background activity by default or I should add something to code ?

Thanks!

Upvotes: 4

Views: 1241

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317467

Analytics is looking at the time the user spends in your app, which means that (for Android) an Activity is visible on screen. Anything happening in a service or in the background does not count as usage.

If you want to record time spent playing music, you can create your own custom events to track that, then export your data to BigQuery to derive a summary of that behavior.

Upvotes: 2

Related Questions