You need to use the UIFacade to add items to menus, which will allow you to set up the events. You use the Events Facade to handle them.
How to detect if menu button was pressed using sl4a?
Question
Is there a way to detect if the 'menu/settings' button has been pressed on an Android phone using sl4a?
I was looking through the API reference, and it looks like the 'Events' section is what I need, but it doesn't specify anything about either the menu, home, search, or back buttons.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow