Thursday, June 25, 2009

Haptic Feedback on Touchscreen Devices

After having a brief play with a workmate's Samsung Omnia the other day, I found that the simple haptic feedback it gave was very useful in using the device. For those who've been unlucky enough not to use an Omnia yet, whenever you touch a button on screen, the phone gives a quick little vibrate shot to let you know it's registered the press. It really does have more of an effect than you'd expect it to.

I set about this morning trying to find if anyone had created anything that would provide a similar experience on my Touch Diamond. I like the phone in general, but typing out SMSs on the on-screen keyboard is pretty terrible. It's far to easy to tap a key, only to find that it didn't register the key press, and now you're half-way through a misspelt word. It's not so much a case of pressing the wrong key (although that happens too with big fingers and small on-screen key targets...) - more along the lines of it registering the press half-way between two on-screen "keys". I could immediately see how something like the Omnia's haptic feedback system would make it much better in this regard.

And what do you know? XDA Devs to the rescue again:
I've downloaded it and installed it, and am happy to report that it does what it says on the tin! It's quite strange for the first 5 mins, clicking around on the phone and having it buzz in your hand. The software is quite configurable, with such nice defaults as disabling the vibrate when the phone is locked (so it doesn't vibrate away in your pocket if it turns itself on whilst you're walking), and to be able to restrict it to only work with the on-screen keyboard.

Unfortunately, it's not quite what I was after, though. Because it's done as a driver for the touschreen, ANY press on the touchscreen registers a buzz. So it still won't help me with my bad typing - I'll still press the gap between two "keys", and the phone still won't register it as a keypress, but it will buzz to tell me I've hit the screen. Which is disappointing. I really was hoping for something more akin to the Omnia's more deeply integrated haptic feedback system.

What I was hoping is that someone would have written a hook into the actual software button press event, so that the vibrate/haptic is only triggered when you touch the screen on an area that the app is interested in. IE, when I press a key on the virtual keyboard, the app detects not the physical press of my finger on the screen, but it registers a click on that particular key. It then interprets that as it would (IE, detects input of a "T" character, say), and prints it to the screen/adds it to the message, etc. What I would like is for the haptic feedback to be triggered at this point. IE, not all screen presses trigger a buzz - just the ones that the app is interested in.

I understand this means that the app can't be coded as a generic touschreen driver - that's too low a level in the app stack. The touchscreen doesn't know about the clickable areas in the app - it's job is just to register the click on the screen, map it to a set of X & Y co-ords, then pass that event through to the application.

The most obvious way to add the haptic feedback to an app is to have the functionality coded into the application itself. So, in the aforementioned SMS example, it would register the press on the T key, print the T to the screen, then give a quick buzz. Obviously this puts the burden of development onto the application developers themselves, and some apps might support it but not others, etc. All in all, not an elegant solution.

What I was hoping was that some smart cookie would be able to tap into the generic windows event for the click, and hang the haptic feedback functionality off that. But I'm not even sure that's possible these days with winmo in a touchscreen configuration. It's highly possible that the app authors don't use any generic windows controls for their touchscreen interfaces - they may have their own screen-press handler function that simply takes the X&Y co-ords, figures out what button was under that bit of screen, and then calls their own specialised action handler. I really don't know - I've never done any WinMo development at all.

So, I guess what I'm saying is that whilst TouchResponse isn't great, it's probably the best that can be done. I'll use it for a couple of weeks and see if there's any benefit to it, and how it impacts on battery life, and post back with my conclusions. If you want to try it out for yourself, simply click the link above to open the thread on XDA Devs - you'll need to register to be able to download the app.

No comments: