Trap Android Home button

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderator: Klaus

Post Reply
Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Trap Android Home button

Post by Simon » Mon Sep 17, 2012 1:55 pm

Or a way to tell that an Android app is no longer on top.

Thanks,
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Trap Android Home button

Post by Klaus » Mon Sep 17, 2012 6:03 pm

Hi Simon,

maybe the "suspendstack" message is sent in that case?


Best

Klaus

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Trap Android Home button

Post by Simon » Tue Sep 18, 2012 12:15 pm

Sorry Klaus,
No Luck.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Trap Android Home button

Post by Klaus » Tue Sep 18, 2012 1:21 pm

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

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Trap Android Home button

Post by Simon » Tue Sep 18, 2012 1:40 pm

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
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Trap Android Home button

Post by Klaus » Tue Sep 18, 2012 1:43 pm

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 8)


Best

Klaus

Post Reply