Skip to content
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

Only update session tracking after Activities have changed state #1690

Merged
merged 1 commit into from
May 20, 2022

Conversation

lemnik
Copy link
Contributor

@lemnik lemnik commented May 18, 2022

Goal

On SDK 29 and higher use the onActivityPostStarted and onActivityPostStopped to update the session tracking, ensuring the Activity has finished changing state before we fetch new session state attributes.

Design

When the foreground activities are started and stopped we capture flags such as context and inForeground and send them to observing layers (such as ReactNative and NDK). By capturing them after the onStart/onStop methods have returned we ensure that these attributes are properly up-to-date.

Testing

TBD

@lemnik lemnik requested a review from Cawllec May 18, 2022 13:08
@bugsnagbot
Copy link
Collaborator

bugsnagbot commented May 18, 2022

Android notifier sizes

Format Size impact of Bugsnag (kB) Size impact of Bugsnag when Minified (kB)
APK 1855.69 1606.18
arm64_v8a 651.66 401.8
armeabi_v7a 586.13 340.37
x86 725.37 475.51
x86_64 692.61 446.85

Generated by 🚫 Danger

@lemnik lemnik marked this pull request as ready for review May 19, 2022 08:32
Copy link
Contributor

@Cawllec Cawllec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I'm quickly testing another test change for a very similar test-flake, so I'd hold off from merging just yet.

@lemnik lemnik force-pushed the PLAT-8379/session-lifecycle-fix-sdk29 branch from ade6265 to b02c087 Compare May 20, 2022 09:45
@lemnik lemnik merged commit fbdd4d4 into next May 20, 2022
@lemnik lemnik deleted the PLAT-8379/session-lifecycle-fix-sdk29 branch May 20, 2022 10:05
@lemnik lemnik mentioned this pull request May 24, 2022
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

Successfully merging this pull request may close these issues.

3 participants