Everyone Activitycalls onSessionStart(context, apikey);and onSessionEnd(context);, and it's great to keep track of the session in all actions. Even fragments can do the same, but when the Service is involved (and you think that the session did not end until the service performs any actions), what happens in the following scenario:
- OnStart () Activity → Initial Launch (Activity Context)
- Service onCreate -> Service.SomeActionIsHappening () -> Flurry Start (service context)
- OnStop () activity → Stop signal (activity context)
- The service is still running -> calls Service.SomeOtherAction () -> Flurry Start (service context)
- End of service → Stop signal (service context).
So the balance was (in order):
This is normal. The account of the beginning / end of activity is balanced to 0.
- Service start.
- Service start.
- End of service.
Now do you need to call for the fourth time to balance calls? (remember that the context was the same, the service was called start two times, but it called the end once).
Or is it enough (and indeed) for Flurry to get N number of starts and one (or more) end if the last call from the same context was onEndSession?
Does Flurry provide a number of links (like Cocoa) or just a list of contexts?
I have not seen the documentation for this particular scenario. All documentation says the following: (emphasis mine)
onEndSession onStartSession, , onStartSession. . , , onStartSession, onEndSession, . onStartSession 10 , onEndSession, , . , , , , .
, , 10 ...