I want to prevent users from being able to take a picture with the external camera button on Google Glass when inside my app.
I am currently catching any camera button events in my main Activity by overriding the "onKeyDown" method. However, I found that if a Google Glass option menu is opened within my app when the user needs to select a menu item (e.g. when method "openOptionsMenu" is invoked), the keyEvents are handled separately from my activity, and users can end up accidentally taking a picture.
Is there a way to capture keyDown events when within the options panel?
Is there a way to get access to the "view" that holds the option panel, and add an onKey listener to it? I have looked into trying to obtain this view via "onCreatePanelView", but that method just returns null.
An alternative is for me to override onCreatePanelView and create my own custom panel view, but I am hoping for a solution that avoids this and allows me to add an onKeyDown listener to the default option panel.