简体   繁体   English

面向设备的Flurry Analytics,Android

[英]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? Flurry中的会话似乎以活动的开始和结束开始和结束,并且设备方向有效地导致了新的活动生命周期的开始,我是否为此收到了两组数据?

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. 要在通话onStartSession如果到以前的调用将只启动一个新的会话onEndSession发生了十秒钟前。 (ten seconds is the default, see setContinueSessionMillis ) (默认setContinueSessionMillis ,请参见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. 所以,如果你onStartSession从每个Activity.onStartonEndSession从每个Activity.onStop会话数据不会因方向的变化而膨胀,因为这些活动的生命周期方法会比开10秒快得多。 Your session data won't be inflated by users moving from FooActivity to BarActivity either, since those transitions are also shorter than ten seconds. 从FooActivity转到BarActivity的用户也不会夸大您的会话数据,因为这些转换也短于十秒钟。

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. 相反,如果用户启动您的应用程序并从FooActivity转到BarActivity,然后又离开您的应用程序,则当他们返回BarActivity的onStart将与FlurryAgent.onStartSession一起FlurryAgent.onStartSession ,并且如果离开时间超过十秒钟,则将进行新的会话开始。 This is usually what developers want to track. 这通常是开发人员想要跟踪的。

(disclaimer: I work on the Android SDK at Flurry) (免责声明:我在Flurry使用Android SDK)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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