androidx / androidx/media

Add support for haptic playback in the ExoPlayer

Open
#2,677 4 comments 0 reactions 1 assignee View on GitHub

@icbaker is already working on this.

Since Jul 28, 2025.

enhancement
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

Use case description

Haptic feedback is an important feature of many modern Android application, as it can greatly enhance the user experience. Furthermore, haptic feedback is often accompanied with audible feedback, sometimes even a visual animation.

For optimal user experience, it is vital that all channels of these multimodal (tactile + audible + visual) experiences are synchronized. Specifically the tactile and the audible signals require a precise synchronization, while human perception allows for somewhat more tolerance regarding the visual signal.

A way to play back rich haptic feedback in a way that's synchronized to audible feedback would solve this need and enable greatly enhanced tangible interactions.

See https://source.android.com/docs/core/interaction/haptics/haptics-ux-foundation#tips-for-implementing for more details.

Proposed solution

The MediaPlayer and the SoundPool APIs support playback of .ogg files encoding both audio and haptic channels. It would be very useful to have support for these .ogg files in the ExoPlayer as well.

Alternatives considered

The MediaPlayer and the SoundPool APIs support playback of Audio-Coupled haptics. However, since Android 16, unreliable behavior of the MediaPlayer has been observed (see https://issuetracker.google.com/issues/433531614). Furthermore, the usage of the ExoPlayer is preferred over the MediaPlayer in general, according to the documentation here: https://developer.android.com/media/platform/mediaplayer.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.