No,Manish It is not possible to capture HomeKeyPress.
But there must be possibility to check whether ur app is in foreground. On Tue, Feb 15, 2011 at 4:20 PM, cool.manish <mannishga...@gmail.com> wrote: > Hi, > > How can we capture home key event? > 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. > > -- > 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 -- 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