On Tue, Nov 1, 2011 at 8:57 AM, Aki <[email protected]> wrote:

> I am using Google Analytics in my application.
>

GA is not part of the SDK, so you're going to be hard-pressed to get a good
answer here. Try the GA documentation and see if there is a forum or user
group. I'll try anyway.


> I would like the tracking session to be reset when the application goes to
> the background.
>

You mean you want to call "stop" on the tracker? Why?


> I would like to do it without having to maintain state of each activity
> (my application has quite many Activities and I would rather not update the
> application state in each Activities onCreate / onPause / OnDestroy).
> Is this possible?
>

What state do you think you need to be tracking?


> Moreover, I would like to differentiate between the application going to
> the background due to say a phone call or alarm to when the user actually
> presses the home or back button to exit the application.
>

You can override the back key per Activity. Beyond that, there is no
difference in how your Activity gets stopped - it's just another activity
coming over it, which includes the Home activity.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to