Page 1 of 1
Trap Android Home button
Posted: Mon Sep 17, 2012 1:55 pm
by Simon
Or a way to tell that an Android app is no longer on top.
Thanks,
Simon
Re: Trap Android Home button
Posted: Mon Sep 17, 2012 6:03 pm
by Klaus
Hi Simon,
maybe the "suspendstack" message is sent in that case?
Best
Klaus
Re: Trap Android Home button
Posted: Tue Sep 18, 2012 12:15 pm
by Simon
Sorry Klaus,
No Luck.
Simon
Re: Trap Android Home button
Posted: Tue Sep 18, 2012 1:21 pm
by Klaus
Hi Simon,
since I do not develop for mobiel I can only guess.
What does the HOME button do? Quit the current app?
You could try to catch one of these messages:
closestack
closestackreqeust
shutdownrequest
Best
Klaus
Re: Trap Android Home button
Posted: Tue Sep 18, 2012 1:40 pm
by Simon
Hi Klaus,
We chatted about this in the Android forum and none of LC regular messages get sent (that suspendStack mess. I hadn't tested before).
The Home button leaves the application running in the background until the memory is needed. This is a problem for example when your stack uses sounds during game play, Home btn will keep playing the game, Back btn will shutdown the application and normal LC messages are sent.
Thanks,
Simon
Re: Trap Android Home button
Posted: Tue Sep 18, 2012 1:43 pm
by Klaus
Hi Simon,
ah, I see. I'm afraid if Livecode doesn't support this natively, then you can't do anything about this.
But maybe some other Android developer knows a workaround.
Good luck
Best
Klaus