Forcing an android app to quit when the 'home' button is clicked?
terry.judd at unimelb.edu.au
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 lists.runrev.com on behalf of
jacque at hyperactivesw.com> 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 hyperactivesw.com
>HyperActive Software | http://www.hyperactivesw.com
>use-livecode mailing list
>use-livecode at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
More information about the Use-livecode