I have a strange issue in an app that some users have and that I can't reproduce. So, I decided to track some values using Flurry, since I already use it for analytics.
I have a WakefulBroadcastReceiver
with this inside:
@Override
public void onReceive(Context context, Intent intent) {
FlurryAgent.onStartSession(context, "MyReceiver");
Intent service = new Intent(context, MyService.class);
Log.i("WakefulReceiver", "Starting service @ " + SystemClock.elapsedRealtime());
startWakefulService(context, service);
FlurryAgent.onEndSession(context);
}
I can see that Log.i()
is getting called, the session is tracked (I can see Flurry log some stuff and send it to the server), but it is not visible at dev.flurry.com (including any events tracked inside this session). Other sessions, that are Activity
related are tracked fine.
Same with the IntentService
, that is called from the receiver - I start a session in onHandleIntent
and end it there, but it does not show up at the Flurry website.
I have tried to remove receiver session and leave service session only, it still does not show up. The uptime of the receiver/service is less than a second, so I have concluded that Flurry doesn't want to track sessions this short. Is this the case? Is there a minimum value for Flurry session duration for it to be tracked?
Btw, if I have another session going (like an Activity
related one), the events from the receiver/service sessions are not tracked too.
I have updated Flurry SDK to 6.1.0 and it started tracking short sessions, the problem seems to be fixed.