But those will be invoked when app starts another activity,dialog or any
pop up window. I know there are couple of ways to do it. Like onPause()
check the activity stack for number of activities in it.If it has only one
activity, in that case we can consider app is going to background.


On Fri, Apr 5, 2013 at 12:12 PM, RichardC <richard.crit...@googlemail.com>wrote:

> You already get 2 callbacks
> Activity.onPause()
> Activity.onStop()
>
> What else do you need ?
>
>
> On Friday, April 5, 2013 5:27:10 PM UTC+1, disha wrote:
>>
>> Hi,
>>
>>    I want to fire an event when android app goes into background like by
>> pressing home key button on device. Is there any better way to do this?
>>
>> Thanks
>>
>  --
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to