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

Don't start sessions when ReactNative apps are loaded in the background #2154

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

lemnik
Copy link
Contributor

@lemnik lemnik commented Jun 6, 2024

Goal

Don't start/resume sessions in ReactNative apps when the bundle is pre-loaded in the background (leaving it to the native layer to start the session when appropriate).

Changeset

Replace the resumeSession call in the ReactNative Bugsnag.start implementation with a new NativeClient.resumeSessionOnStartup call. The Android native layer first checks that the app is in the foreground before calling resumeSession as normal.

Testing

Manually tested using system broadcasts.

Copy link

github-actions bot commented Jun 6, 2024

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 43.80 kB 13.43 kB
After 43.80 kB 13.43 kB
± No change No change

code coverage diff

<temporarily disabled>

Generated by 🚫 dangerJS against 6af8054

Copy link
Contributor

@yousif-bugsnag yousif-bugsnag left a comment

Choose a reason for hiding this comment

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

looks good to me

@lemnik lemnik merged commit a8047d1 into next Jun 7, 2024
56 checks passed
@lemnik lemnik deleted the PLAT-12222/only-resume-session-in-foreground branch June 7, 2024 07:19
@yousif-bugsnag yousif-bugsnag mentioned this pull request Jun 7, 2024
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