Back button : Quit
Monkey Targets Forums/Android/Back button : Quit| 
 | ||
| Version 72b. Now press back button quit monkey app. unable to code: If (KeyHit(KEY_ESCAPE) or (KeyHit(KEY_BACKSPACE) do.... endif Last known good respond: Version 68c | 
| 
 | ||
| Try "KEY_BACK" and/or "KEY_CLOSE". | 
| 
 | ||
| Both not work. Still quitting. I have to go back to Version 68c. No problem. | 
| 
 | ||
| I had the same issue. What people here tell you is "Use KEY_BACK, that works!" What people here fail to tell you is that KEY_BACK only works in KeyHit() not KeyDown(), which baffled me to death when I failed to get it working for smegging ages! Public Global HitBack Method OnUpdate() HitBack=KeyHit(KEY_BACK) ' Stick this right up at the top of your OnUpdate! end Then quit on HitBack. | 
| 
 | ||
| He was using keyhit in his code example... But it is good to be clear about it. | 
| 
 | ||
| Not really about const KEY_??? Press a back button on android just quiting. on version 70f an above. I make further test and found out that the back button quit app start from version 70f to 72b. Further ver not test. Last known good version is 68c to 70b. | 
| 
 | ||
| Ther are now OnBack and OnClose methods in the mojo App class - please refer to App class docs. | 
| 
 | ||
| Forget about all these key codes, ESC hit and so on. Just put this into your app: Method OnBack:Int() 'Handle that stuff here End Method |