android std button

Monkey Targets Forums/Android/android std button

Zurrr(Posted 2012) [#1]
Could someone tell me how to know when user
Press menu and back button. And also command to
Quit application. Tnks


dave.h(Posted 2012) [#2]
to quit use Error ""

eg

if GAME_OVER Error""


Origaming(Posted 2012) [#3]
for the back button and quit aplication
[monkeycode]
If KeyHit(KEY_ESCAPE) 'press back button
Error "" 'quit application
End[/monkeycode]

i used onsuspend, to know when user press home button :D


Gerry Quinn(Posted 2012) [#4]
Is one supposed to do this, except maybe to make a save in case the user does not return for ages?


golomp(Posted 2012) [#5]
Hi,

For Menu button there is a "non standard" solution.
I read it in a past post.

By "non standard" I mean it doesnt work on all smartphone.
(maybe depending on Android Version ? or for physical button ?).

Method :
You test if touch X and Y function are inside Sizescreen limit.
If not, you are probably touching Menu button.

But as i said it doesn't work on all smartphone.
I made some try but i was not satisfied.