I am using FLurry_3.2.2.jar
, and have code like this in each Activity
. It correctly logs all sessions, but does not log events. (Actually, it logged one event, one time, from my Home
activity)
@Override
protected void onStart()
{
super.onStart();
FlurryAgent.onStartSession(this, Utilities.FlurryKey);
FlurryAgent.logEvent("Home");
}
@Override
protected void onStop()
{
super.onStop();
FlurryAgent.onEndSession(this);
}
Your code looks right. In these cases I find that the most likely cause is that your full sessions aren't being sent up to the Flurry servers. You may be getting the initial session report, but the session is closed at the end of the apps lifecycle, and it is only at that point that events are also sent up to the server.
You need to make sure that onStartSession
and onEndSession
are called on every activity. If these are missed on any activity (especially onEndSession), your session may not close and the events may not be sent up.
Events are sent at the end of the session, when all activities have stopped. You need to make sure to fully end your app on your test device before you can expect to see any events arrive on the server. If you have not done this, the event data may still be sitting on your device without having been sent.
The Flurry SDK also outputs logs that may help in narrowing down on the problem. You can enable logging with FlurryAgent.setLogEnabled(true)
and FlurryAgent.setLogLevel(Log.DEBUG)
.
Feel free to reach out to [email protected] if you have more questions.
Disclaimer: I work at flurry :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With