I'm trying to use Flurry Analitcs in my app. After read a sdk document I did the following code in each activity from my application:
@Override
protected void onStart() {
FlurryAgent.onStartSession(this, "xxxxxxxxxxxxxxxxx");
super.onStart();
}
@Override
public void onStop() {
super.onStop();
FlurryAgent.onEndSession(this);
}
My doubt is that I have many AsyncTask and some IntentServices in my app, and in the documents they say:
Insert a call to FlurryAgent.onStartSession(Context, String), passing it a reference to a Context object (such as an Activity or Service)
So, should I call onStartSession in onHandleIntent method?? And where should I call on onEndSession? In the final process and in a finally block? And about AsyncTasks, should I implement it too even if I pass my activity context through my task?