Open Bug 1910394 Opened 7 months ago Updated 7 months ago

Spike: Investigate the Sync API to establish how to use the conditions specified in the Sync microsurvey requirement

Categories

(Fenix :: Experimentation and Telemetry, task, P1)

All
Android
task

Tracking

(Not tracked)

People

(Reporter: towhite, Assigned: towhite)

References

Details

Can/how to determine the following conditions using the Sync API:

  • User has been signed into sync for 7+ days
  • User is signed into a second device

User has been signed into sync for 7+ days

There are existing triggers called FXA_SIGNED_IN and FXA_NOT_SIGNED_IN that use the sync_auth.sign_in metrics. This is set in BackgroundServices.kt. In this file we also use onAuthenticated when a user signs in to set the following preference:

context.settings().signedInFxaAccount = true

andonLoggedOut when a user logs out we set this value to false

context.settings().signedInFxaAccount = false

Therefore, using a combination of the signedInFxaAccount preference & the sync_auth.sign_in event the User has been signed into sync for 7+ days condition can be determined.

Update
With trigger-if-all & exclude-if-any we can have an event where we count that we have seen a sign in in the last 7 and we haven't count sign out in the last 7 days. These events are SyncAuth.signIn & SyncAuth.signOut

User is signed into a second device

FxaDeviceConstellation is used to Describes available interactions with the current device and other devices associated with an [OAuthAccount]. and accessed in Devices.kt

Also see Jeff's comment below.

Blocks: 1910595
See Also: → 1910870
No longer blocks: 1910595
You need to log in before you can comment on or make changes to this bug.