Forcing an android app to quit when the 'home' button is clicked?

Terry Judd terry.judd at
Tue Jan 19 01:54:12 EST 2016

Thanks Jacquie - you’re right, suspendStack doesn’t seem to be supported
by either iOS or Android so no joy there. I wanted the app to quit when
the user navigated away from it because I have a routine that attempts to
sync files that have been saved but not uploaded each time the app starts
up. If the app stays running then that sync script doesn’t run. I can work
around this but it would be nice to know when the app loses focus.


On 19/01/2016 5:04 pm, "use-livecode on behalf of J. Landman Gay"
<use-livecode-bounces at on behalf of
jacque at> wrote:

>On 1/18/2016 8:54 PM, Terry Judd wrote:
>> Yeh - the back and menu keys trigger messages but not the home key. It
>> hadn¹t occurred to me to try suspendStack - I¹ll give that a whirl.
>I don't think any messages are sent at all when the Home key is pressed.
>Ralph may be thinking of the "shutdown" message which is sent when you
>issue the "quit" command, but that doesn't happen when the Home key is
>pressed because the app doesn't quit, it keeps running in the background
>until Android needs the memory.
>The app should save its state on every significant change because you
>never know when the OS will shut it down.
>Jacqueline Landman Gay         |     jacque at
>HyperActive Software           |
>use-livecode mailing list
>use-livecode at
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:

More information about the use-livecode mailing list