On Android, I can use View.performHapticFeedback(HapticFeedbackConstants.XXX)
to perform the vibration. But for older phones or phones with Eccentric Rotating Mass (ERM) haptic actuators (vibrators), the experience isn't great. So I want to detect and disable vibration on these devices.
But I haven't found any API to achieve this.
The closest API is Vibrator.areEffectsSupported()
, but it always returns true on the devices I tested. In addition Vibrator
and VibratorManager
need android.permission.VIBRATE
permission.
So, please tell me if you know.