Skip to content

application_foregrounded triggers for non-foregrounding events #387

Open
@lhunath

Description

@lhunath

Describe the bug
application_foregrounded is described as:

This event is fired when a user opens the app or brings it back into the foreground of their device. This is only collected by the Swift library.

However, in reality the event is fired in many other situations:

Image

  1. It is fired twice when the application becomes inactive
  2. It is fired once before backgrounding when the device is locked

Furthermore, it is fired alongsinde application_opened which already fires every time the application is foregrounded, leading to a lot of confusion. What is the definition of the words: opened, foregrounded and backgrounded. The current behaviour is terribly asymmetric and misleading.

To Reproduce
Steps to reproduce the behavior:

  1. Launch the application from a force-quit state (not included in the screenshot)
  2. Background the application (included)
  3. Foreground the application (included)
  4. Open the notifications center drawer (included)
  5. Close the notifications center drawer (included)
  6. Lock the phone (included)

Expected behavior

  1. application_opened & application_foregrounded
  2. application_backgrounded
  3. application_foregrounded
  4. application_backgrounded?
  5. application_foregrounded?
  6. application_backgrounded

Platform (please complete the following information):

  • Library Version in use: 1.7.3
  • Platform being tested: iOS
  • Integrations in use: Segment Firebase, 1.4.0, Firebase 11.12.0

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions