> I am storing some data at application level, I want to clear it so
> that it doesn't consume memory when my application is in background.
> At the same time, i wish that this data shouldn't get earsed if my
> application has gone in the background because of an incoming call.
>
> Do I need to capture key event in every activity? Is it possible to
> handle it at application level, so that i dont have to handle it in
> every activity and rewrite the same code.

I'd suggest you read on Activity life cycle and write your resource saving
code in the right methods, so you get your goal without dirtry trickery.
http://developer.android.com/reference/android/app/Activity.html

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

Reply via email to