I'm working on a smart glasses project that is using an Intrinsyc Open-q 2500 SOM (connected to a custom breakout board) that utilises a Snapdragon processor, running a custom Android SDK (Oreo 8.1) made for smart watches.
To navigate through the Android UI, as well as applications, we are hoping to use a IQS223 touch sensor chip, which will output high for a short period when a gesture is detected. E.g If a swipe forward is detected it will set pin1 (connected to GPIO1 of SOM) to high for 80ms, or if a TAP is detected it will set pin2 (connected to GPIO2 of SOM) to high for 80ms.
I've read it is possible to connect navigate/control an application via an external keyboard. All interactive widgets are focusable, meaning that the selected widget is highlighted (via a glow or appearance change). Therefore, It seems I should be able to fire a keyboard event on detection of a GPIO input change, and use that event to trigger an action. E.g. on detection of a high input on GPIO1 I'd fire a "Enter" keypress event.
My question is how would I go about doing this for the main Android UI (navigation of settings, selecting an app from main menu etc.)? i.e I want to set the main Android UI to be focusable (if possible) so I can navigate/control the device by simulating keypresses, which are fired when an input level changes on a certain GPIO pin.
Is there an alternate method to achieving this?