How to block/catch additional buttons (ANDROID)?

Previous topic - Next topic

Mikele

Hi,

I'm new here and I'm still learning GLB but I can compile and deploy code to Android device. But there's a small problem. I have Galaxy S - as you probably know apart from  main button it has two additional buttons near the bottom edge of the screen. So when I'm testing an application I accidentally press BACK button and the app ends immediately. Can I block/catch that event from the code (or should I change something in XML AndroidManifest?).

Thanks in advance.

Michal

Mikele

I've found a topic http://www.glbasic.com/forum/index.php?topic=6788.msg54978#msg54978 so I know where I should start but I'm not sure if it does work finally. Anyone?

Moebius

You would have to modify 'SDLActivity.java' (buried in the distribute folder) to return back key presses like other keys, and not immediately close the app.  I'm not sure if anyone had it working from that other thread, and using the soft keys like normal keys would be great...
Endless Loop: n., see Loop, Endless.
Loop, Endless: n., see Endless Loop.
- Random Shack Data Processing Dictionary

Mikele