简体   繁体   中英

Flurry analytics on device orientation, Android

I am trying to find information regarding whether device orientation in my application is skewing the analytics due to sessions log occurring during the activity life cycle.

Sessions in Flurry seem to begin and end with activity start and stop, and a device orientation effectively causes a new activity life cycle to begin, do I receive two sets of data for this?

If so, what is the correct way to handle device orientation so that when a user rotates the device I don't receive skewed results?

A call to onStartSession will only start a new session if a previous call to onEndSession occurred over ten seconds ago. (ten seconds is the default, see setContinueSessionMillis )

So if you call onStartSession from each Activity.onStart and onEndSession from each Activity.onStop your session data will not be inflated by changes in orientation, since those Activity lifecycle methods will be much quicker than ten seconds apart. Your session data won't be inflated by users moving from FooActivity to BarActivity either, since those transitions are also shorter than ten seconds.

Instead, if a user starts your app and goes from FooActivity to BarActivity, but then leaves your app, when they return BarActivity's onStart will called along with FlurryAgent.onStartSession , and if they've been away for longer than ten seconds a new session will be started. This is usually what developers want to track.

(disclaimer: I work on the Android SDK at Flurry)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM