简体   繁体   中英

Problems getting timed events in Flurry Analytics to work

I have already checked out this link and followed the instructions exactly: Can Flurry analytics provide average of integer information?

Have also read the instructions from Flurry, provided when downloading the SDK. I am putting in a "onStartSession()" and "onEndSession()" on every activity in my app and within these "session wrappers" I try to log a timed event, to keep track of how long the user used each activity.

The events get logged in Flurry Analytics, however there is no "Event duration" information available (the clock icon).

Here is my code:

public void onStart(){
   super.onStart();
   FlurryAgent.onStartSession(this, Flurry.FLURRY_KEY);
   FlurryAgent.logEvent(Flurry.ACTIVITY_RADAR, true); 
}


public void onStop() {
   super.onStop();
   FlurryAgent.endTimedEvent(Flurry.ACTIVITY_RADAR);
   FlurryAgent.onEndSession(this);
}

Would appreciate some help on this annoying problem! /Martin

I had the same issue and after bashing my head against the wall for a while I just implemented my own timer. I even emailed Flurry to ask them what was going on, but no response. I even mentioned in the email how their events according to their API would start a session before ending the last session due to Androids Activity lifecycles (the onStop of the current activity CAN be called AFTER the onStart of the next activity).

In my solution I have a general timer class that starts timing according to a string and when the endTimer is called for that string it returns a time in seconds according to timestamps. Then when I call flurry I just add a hashmap with that parameter. It isn't a great fix, but couldn't find anything else that worked.

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