-
Notifications
You must be signed in to change notification settings - Fork 628
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.