android - How to handle "keyDown" events that occur when options menu is opened in Google Glass app -


I want to prevent users from being able to take a picture with an external camera button on Google Glass inside my app.

I am currently holding any camera button event in my main activity by overriding the "onKeyDown" method. However, I found out that if a Google Glass option menu is opened within my app, when the user needs to select a menu item (for example, when the method "OpenOptems menu" is applied), the main avents My activity is controlled separately, and the user can accidentally take a picture.

Is there a way to capture key-down events inside the Options panel?

Is there a way to gain access to "view" which has the options panel, and adds another listener to it? I have seen this scene trying to get through the "Create Panelwell", but this method is still empty.

Alternative options for me are to override the creative view and create my own custom panel view, but I have a solution that avoids it and lets me add an onDowndown listener to the default options panel is.

You can try using this code snippet in the menu:

  Public Boolean On Kidadown (Int i, Key Event Key Event) {if (i == 27) {keyevent.startTracking (); Back true; } And {return SuperCondown (Eye, Key Event); }}    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -