[android-developers] Re: Recognising when an app is closed

2009-02-03 Thread Mark Nuetzmann
mcswd01, You also might take a look at using the onDestroy() event of the first/ main Activity. onDestroy for the main activity will only get called if you hit back from that activity of call finish() for that activity. I think this is what you are looking for. On Jan 17, 10:13 am, mscwd01

[android-developers] Re: Recognising when an app is closed

2009-01-17 Thread Mark Murphy
mscwd01 wrote: I may just be overlooking something blatently obvious here but this seems to be alluding me... I have an app which routinely contacts my server requesting updates (small amounts of data). Whilst the user is using my app I wish this updating to continue, however when the app

[android-developers] Re: Recognising when an app is closed

2009-01-17 Thread mscwd01
Isn't onPause() called when one Activity calls another too? I want to know when an entire Activity has lost focus, if I use onPause () in an Activity which calls another, when the other Activity has started the initiating Activity's onPause() method is called. On Jan 17, 1:03 pm, Mark Murphy

[android-developers] Re: Recognising when an app is closed

2009-01-17 Thread Mark Murphy
mscwd01 wrote: Isn't onPause() called when one Activity calls another too? Sure. I want to know when an entire Activity has lost focus, What is an entire Activity? if I use onPause () in an Activity which calls another, when the other Activity has started the initiating Activity's

[android-developers] Re: Recognising when an app is closed

2009-01-17 Thread mscwd01
Okay, I'll have to opt for the stop/start approach each time you switch from Activity to Activity - its not a very elegant solution though. Im suprised theres not a whole application has lost focus.onPause(). On Jan 17, 3:27 pm, Mark Murphy mmur...@commonsware.com wrote: mscwd01 wrote:

[android-developers] Re: Recognising when an app is closed

2009-01-17 Thread Al
Wouldn't onStop() be a better solution since it gets called when the app is no longer in focus? From the doc: Called when the activity is no longer visible to the user, because another activity has been resumed and is covering this one. This may happen either because a new activity is being

[android-developers] Re: Recognising when an app is closed

2009-01-17 Thread Dianne Hackborn
On Sat, Jan 17, 2009 at 8:13 AM, mscwd01 mscw...@gmail.com wrote: Im suprised theres not a whole application has lost focus.onPause(). Well in Android there isn't really a strong concept of an application in general. For example, when the user clicks on a button to pick an image for something