I have a fitness app, and whilst in use, the phone is often locked whilst the app is being used during a. I enabled manual session handling because the analytics recorded multiple sessions during use, one prior to the phone being locked and one after the phone was unlocked.
To rectify this, I switched to manual session handling and manually called GameAnalytics.StartSession() when the sdk is Initialised and EndSession when the app quits.
I added logic for the ApplicationPause(bool) handling to record end session on pause only if a workout had not been started and also to start a new session when the app is unpaused only if a workout was not in progress.
Despite this, the app still recorded multiple EndSession events even though I did not call EndSession till the app quits.