Implement haptics on Android
Stay organized with collections
Save and categorize content based on your preferences.
Haptics is everything you feel through the sense of touch. Modern Android
devices often incorporate a vibration actuator to allow devices to stimulate the
user's sense of touch. These motors have advanced significantly from the
original loud buzzy vibration produced by early devices, and Android apps can
now take advantage of capabilities to give users a richer experience with
subtlety and depth.
The following pages cover everything about vibration, from basic haptic feedback
to increasingly more complex vibration waveforms and effect compositions.
- Haptics design principles
- The page describes the classifications supported by Android haptics and
guidelines for designing them.
- Add haptic feedback to events
- The page presents code examples for different ways of providing haptic
feedback to user interactions.
- Vibration actuators primer
- The page provides an overview of how vibration actuators work, which is
important prerequisite knowledge for creating custom haptics.
- Create custom haptic effects
- This page provides several examples of using different haptics APIs to
create custom effects in an Android application.
- Add haptics APIs
- The page is a reference for various haptics APIs available on Android, and
also covers when and how to check for any device support necessary to ensure
your Haptic effects play as intended.
Also, be sure to read the
best practices for accessibility.
Samples
The following samples are available in the Haptic Sampler app on
GitHub. You can also find documentation for each here.
This documentation also includes code examples for the following custom vibration patterns:
Video
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-05-28 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-28 UTC."],[],[],null,["# Implement haptics on Android\n\nHaptics is everything you feel through the sense of touch. Modern Android\ndevices often incorporate a vibration actuator to allow devices to stimulate the\nuser's sense of touch. These motors have advanced significantly from the\noriginal loud buzzy vibration produced by early devices, and Android apps can\nnow take advantage of capabilities to give users a richer experience with\nsubtlety and depth.\n\nThe following pages cover everything about vibration, from basic haptic feedback\nto increasingly more complex vibration waveforms and effect compositions.\n\n[Haptics design principles](/develop/ui/views/haptics/haptics-principles)\n: The page describes the classifications supported by Android haptics and\n guidelines for designing them.\n\n[Add haptic feedback to events](/develop/ui/views/haptics/haptic-feedback)\n: The page presents code examples for different ways of providing haptic\n feedback to user interactions.\n\n[Vibration actuators primer](/develop/ui/views/haptics/actuators)\n: The page provides an overview of how vibration actuators work, which is\n important prerequisite knowledge for creating custom haptics.\n\n[Create custom haptic effects](/develop/ui/views/haptics/custom-haptic-effects)\n: This page provides several examples of using different haptics APIs to\n create custom effects in an Android application.\n\n[Add haptics APIs](/develop/ui/views/haptics/haptics-apis)\n: The page is a reference for various haptics APIs available on Android, and\n also covers when and how to check for any device support necessary to ensure\n your Haptic effects play as intended.\n\nAlso, be sure to read the\n[best practices for accessibility](/guide/topics/ui/accessibility).\n\nSamples\n-------\n\nThe following samples are available in the [Haptic Sampler app](https://github.com/android/platform-samples/tree/main/samples/user-interface/haptics) on\nGitHub. You can also find documentation for each here.\n\n- [Resist (with low ticks)](/develop/ui/views/haptics/custom-haptic-effects#resist)\n- [Expand (with rise and fall)](/develop/ui/views/haptics/custom-haptic-effects#expand)\n- [Wobble (with spins)](/develop/ui/views/haptics/custom-haptic-effects#wobble)\n- [Bounce (with thuds)](/develop/ui/views/haptics/custom-haptic-effects#bounce)\n\nThis documentation also includes code examples for the following custom vibration patterns:\n\n- [Ramp-up pattern](/develop/ui/views/haptics/custom-haptic-effects#ramp_up_pattern)\n- [Repeating pattern](/develop/ui/views/haptics/custom-haptic-effects#repeating_pattern)\n- [Pattern with fallback](/develop/ui/views/haptics/custom-haptic-effects#pattern_with_fallback)\n\nVideo\n-----"]]