0

I'm developing a game, I do offer an optional setting with periodic vibrations for a specific game mode. To make this work well, I need a very short vibration.

On my device, 20ms vibration duration works very well but on other devices, it appears to don't vibrate at all, while 50ms works but is too long for my preference. My guess is that some devices have a specific minimum time.

So my question: What is the lowest vibration duration which will work on every device?

0

1 Answer 1

1

There is no standard for the lowest vibration duration because it's not in the Android specification. Moreover, there is no requirement for every Android device to have any vibrators at all.

According to the Android 13 Compatibility Definition, one of the important thing about vibration is:

3.8.3.1. Presentation of Notifications

If device implementations allow third-party apps to notify users of notable events, they:

  • [C-1-1] MUST support notifications that use hardware features, as described in the SDK documentation, and to the extent possible with the device implementation hardware. For instance, if a device implementation includes a vibrator, it MUST correctly implement the vibration APIs. If a device implementation lacks hardware, the corresponding APIs MUST be implemented as no-ops. This behavior is further detailed in section 7.

(Italic emphasis added)

Other than that, each device is free to determine how the vibrations/haptics are implemented since the specification doesn't set the minimum duration.

Related on Stack Overflow: What is the shortest duration Vibrator.vibrate() can be called with where the device will still vibrate?

2
  • This answer may be disappointing, perhaps as disappointing as the linked Stack Overflow Q&A. However, this is the truth. Other than that, users are free to test their Android device and find the biggest value for the minimum vibration duration...
    – Andrew T.
    Mar 19 at 11:03
  • Ok thanks for your answer, saved me many hours of useless googling for a value. Do you might have your own idea of vibration duration which could cover around 90-95% of devices ? Mar 19 at 19:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .