This prototype was made in under 24 hours for the 2nd annual HackTX Hackathon in Austin, TX on Nov 15, 2013.
Our vision is to create hidden wearable tech that allows you to touch type like you would on any normal QWERTY keyboard, but in the air or on your lap. For products like google glass, an invisible keyboard would be much easier to interact with the device, and would also prevent you from having to talk to yourself in front of other people.
This prototype includes hardware (let me remind you none of us are hardware guys, thus the very un-invisible keyboard), an algorithm to predict which word you are trying to type, and a custom android keyboard that interacts with the hardware and can be used with any application on the device. We use a micro arduino to interpret signals coming from our invisible keyboard and send them to the android device, which in turn uses a custom input method editor to display possible candidates for words to be chosen.
It’s like what T9 did for cell phones with hard keyboards. Except there are 8 buttons instead of 9. And ideally they aren’t actually buttons, you just move your fingers.
Sometimes the trickiest bugs are right in front of you. Also, they actually aren’t tricky at all so just pay attention to what you are doing
We spent a lot of time focusing on getting our serialized hash map which stored all possible words for each integer sequence into the android application. Anubhav worked on the algorithm to generate the serialized hash map, but when I stored that file in res/raw of android it wasn’t loading the data of our dictionary info. We spent around four hours trying to figure out why this was happening, decided maybe it was some strange serializable incompatibility between java versions and decided to serialize it to json instead using gson. Unfortunately, even loading gson from the android assets folder still didn’t fix our issue of loading the data structure.
I’m almost embarassed to say it but I spent way too long trying to track down a null pointer exception about 12 hours in. I’ll blame it on exhaustion. A global variable was getting allocated locally, so when I thought the candidates list was getting updated with possible words to present to the user, it was actually getting destroyed after that function finished executing. I was too busy looking for a more complex solution to a problem that was really simple and I should have that recognized sooner.
This ended our issue of loading the hashmap in from a persistent state, but for some reason our json was malformed and we were unable to actually get a coherent hash map generated. This was also a quick fix and only required a little flushing on Anubhav’s side ;)
Sidhant worked on several hardware prototypes and wrote up the code for the arduino to handle incoming signals. Anubhav worked on the algorithm for generating the serialized hash map which was our key into generating a candidates list for user input. I really enjoyed creating an input method on the android side. I initially started with a main activity and was just making a custom edit text to handle key events, but I realized that an IME would allow users to use the keyboard across the entire phone on any text input. I’ve only ever built an actual app that you can run from the home screen, so this was a great learning experience building something more behind the scenes.