Skip to content

Add application_foregrounded event for Android #264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kanemara opened this issue May 8, 2025 · 1 comment
Open

Add application_foregrounded event for Android #264

kanemara opened this issue May 8, 2025 · 1 comment
Assignees

Comments

@kanemara
Copy link

kanemara commented May 8, 2025

Currently this event is reported only by the Swift sdk, according to docs.
We use Segment as analytics provider in both iOS and Android apps. But such divergencies makes it impossible to have all Mobile analytics combined and analyzed seamlesly using same metrics.
This event is common for mobile platforms, so making it exist for all looks logical and convenient.

@lhunath
Copy link

lhunath commented May 8, 2025

For more details, see segmentio/analytics-android#847.
Also, the rationale is described in segmentio/analytics-swift#172 where it is already accepted and implemented.

However, please be aware of issues with the current Swift implementation: segmentio/analytics-swift#387, as well as the strange definition of the opened event.

I believe Segment will need to be clear about what the definition of opened and backgrounded are before determining what foregrounded should mean.

I actually suspect that the current definitions are asymmetric and misleading (opened = foregrounded?).

Segment might want to rename/copy the existing opened event to foregrounded; or deprecate the existing events and create new ones with clear & symmetric definitions, such as:

  • application_launched [to_background]
  • application_activated [from_background]
  • application_deactivated [to_background]
  • application_terminated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants