The problem is that any pop-up dialog such as Play Service Login / Achievements etc. calls for this Listener. It is not good as the session is not ended.
Could you please advice more proper place to insert Flurry session end. Thanks!
To record a session is actually really tricky, especially on Android.
Depends how do you want to count as a session.
##iOS
It you count everytime user opens your app as one session, you actually want to startSession in applicationDidEnterBackground and call endSession in applicationWillEnterForeground, because on iOS most of the time when user click on the icon of your game, it’s really just switch them from background.
##Android
You can still put startSession in applicationDidEnterBackground and endSession in applicationWillEnterForeground, you have to be really careful. The sad thing is that on android consider your app is in background if there is a pop up dialog on top of it, so things like “open a IAP dialog”, “watch a video” will considered switch to background. In that case, you’ll need to put in logic to discard those garbage session data. something like
If iap
disable session tracking
if showing_ad
disable session tracking