Reactive Haptics

1 hour ago 2

When people think of haptics, they usually think of typing on mobile keyboards or tapping on trackpads. While impressive, these are fairly limited uses of haptics, both attempting to recreate a simple “click.” These are one-shot user events that don’t respond dynamically to the user.

On the Android team, I explored a range of interactive haptics research projects. These went far beyond the classic one-shot effects and used haptics to simulate texture, elasticity, and physicality while the user dragged their finger across the screen. Now that a few of them have actually shipped, I can talk about them. Unfortunately, it’s hard to give you a demo from a web page, but I’m willing to explain what we did. Obviously, words and animated GIFs are a poor substitute, so if at all possible, please try to borrow a Pixel 7, 8, or 9 and try it out yourself.

The latest shipping example was released in the last Android feature drop of 2024. It was an addition to QuickSettings, the shade you pull down from the top of the screen. It is filled with shortcut buttons to things like the Flashlight or Battery Saver. What is tricky about QuickSettings is that some of the buttons have TWO separate actions: a simple tap, usually an on/off toggle, as well as a long press action for more choices (a long press is holding down the finger for 500ms). It’s actually a problem having two gestures on the same button as most users have no idea both are possible. They only tap, never knowing there is also a long press option.

To fix this, two things were needed: the first was distinctly different feedback for both tap and long press events so users weren’t confused. The second was more of a stretch goal to find a way for users to discover this long press action on their own. Given my previous work with the video game designer Raph Koster, I wanted to use his theory of loops and “hintiness” to provide subtle feedback to the user so they could intuit a long press action was possible. (please see the linked article for more info)

My proposed solution didn’t change anything about a single tap. This was a known UX Android pattern and it’s important to leave it unchanged. Like any button, it just visually toggles as before with no haptics. Here is a very boring and standard screenshot of tapping the Battery Saver QuickSetting:

However, if you press down just slightly longer, a low haptic ‘texture’ is played, a slowly building ramp-up effect. This haptic effect is synchronized to the button expanding. When you reach the long press threshold there is a sharp “snap” haptic to mark the completion of the long press and the detailed window then opens.

Clearly you can’t feel it by just watching an animated gif. However, to give you a rough idea of the output, here is an overly simplified amplitude graph of the haptic motor. Also as said before, please go find a Pixel 7-9 (pro or otherwise) as feeling is far more revealing that watching.:

The ramp is a low frequency waveform (around 50hz) with the snap at the end a very short high frequency effect (around 300hz) to provide a strong break. (I’m skipping a lot of technical detail here but happy to go explain more in another post) The biggest benefit to this haptic + visual approach is that tap and long press now feel quite different. It’s really the combination of the visuals plus that haptic that gives a strong sense of completion. The user clearly feels “Oh, I held it down longer and it fired”. The long press now has a deeper and more realistic feel. When it happens, it just makes sense and adds to the overall feeling of quality and depth to the phone.

Important note: If at any time during the haptic/visual ramp the finger is lifted before the long press time has passed, both effects stop and reverse themselves and the gesture just turns into a tap. This is critical as we don’t want the user to tap a little longer than normal and get an unexpected result. Below is a long-ish tap of about 150ms. This is longer than a simple tap but not long enough to qualify for a long press. When a gesture isn’t long enough, it’s just acts like a normal tap:

In fact, this back-off effect is key to the stretch goal mentioned above: helping the user discover the long press gesture. The partial firing of the ramp-up effect plus the partial visual gives a game-like hintiness (this is discussed in the game blog post listed above). Small little variations in tap duration gives the user a clue that maybe holding their finger down a little bit longer would do something. To be honest, this discovery effect is quite hard to test and I can’t say with any rigor that it is a clear success. What I can say is that anecdotally people love this and they are delighted when they discover it. We’ve found no downsides to this approach.

I’m very excited by what is possible with responsive haptics like this. To be fair, this QuickSettings example isn’t the most dramatic, I’d understand if you were a little underwhelmed, but the techniques involved in its solution can be used in many more situations. I’ve used it for example to simulate weight and elasticity for dragging objects on the screen. If there is interest, I’ll follow up with another post about the Android volume and brightness slider (go ahead and check them out if you’ve got a Pixel) There is a lot going on under the hood to make those controls work. There is also lot more detail I’d like to share in future posts.

Note: Big thanks to Juan Sebastian Martinez and Hong Tan for their support during this work and helping it actually make it out the door.

Read Entire Article