amplitude / Amplitude-Kotlin

Amplitude Kotlin SDK
MIT License
27 stars 10 forks source link

fix: fix race condition where an event can be processed before a session gets extended #198

Closed izaaz closed 4 months ago

izaaz commented 4 months ago

Summary

This PR fixes a race condition where an event gets processed after the app enters the foreground but before amplitude gets to create a new session.

Instead of setting a flag in Amplitude when the app enters foreground, we now treat all events fired before amplitude's foreground event is fired as background events.

Checklist

github-actions[bot] commented 4 months ago

:tada: This PR is included in version 1.16.8 :tada:

The release is available on:

Your semantic-release bot :package::rocket: