Why use haptics
- Cross-platform consistency: Six haptic styles have been specifically designed to be comparable across iOS and Android devices, so your feedback patterns work uniformly regardless of platform.
- Rich haptic vocabulary: Choose from impact and notification styles to match the intensity and meaning of each interaction in your app.
- Android-exclusive styles: Three additional Android-only styles (
tick,click,double_click) give you extra expressiveness on Android devices. - Shake gesture support: Respond to physical device shake events with a JavaScript callback, enabling shake-to-action patterns without additional native code.
Prerequisites
- A Median app with the JavaScript Bridge enabled
- The Haptics plugin enabled under Native Plugins in Median App Studio
- A physical iOS or Android device for testing (haptics do not deliver meaningful feedback in a virtual simulator environment)
Implementation guide
App setup
- Navigate to Native Plugins: In App Studio, go to Native Plugins.
- Enable Haptics: Toggle the Haptics plugin to enabled status. The plugin can also be trialed.

Haptics plugin enablement
JavaScript Bridge implementation
Trigger haptic vibration event
Triggers a haptic vibration effect on the user’s device. Pass astyle string to specify which effect to fire.
style is a string parameter that can be any of the following options:
iOS and Android
impactLightimpactMediumimpactHeavynotificationSuccessnotificationWarningnotificationError
tickclickdouble_click
Respond to shake gesture
Add themedian_device_shake() JavaScript function to all pages that should provide a response to the shake gesture. You can also insert this function using the custom JavaScript feature.
For example:
Testing checklist
Use this checklist to ensure Haptics is working correctly in your app:- Each
stylevalue triggers a distinct haptic effect on a physical device -
median_device_shakeis invoked when the device is shaken - Haptic feedback intensity matches the action’s visual and semantic weight
- Plugin does not interfere with app navigation or core web flows
- All haptic behavior is verified on a physical device, not a simulator
Frequently asked questions
No haptic feedback in the simulator?
No haptic feedback in the simulator?
This is expected behavior. Haptics will not deliver meaningful feedback in a virtual simulator environment. Test on a physical iOS or Android device to verify haptic behavior.
Android-only styles not firing?
Android-only styles not firing?
The
tick, click, and double_click styles are supported on Android only. If you are testing on an iOS device, these styles will have no effect. Verify you are testing on a physical Android device.Shake gesture callback not responding?
Shake gesture callback not responding?
Confirm that the
median_device_shake() function is defined on the current page. You can add it globally using the custom JavaScript feature. Ensure the function name matches exactly: median_device_shake.