2

Starting in 8.0, Android will (finally) let us control vibration amplitude as well as duration (api 26 link).

Does anyone know (maybe from past experience with features added) if it will be possible to control vibration amplitude in older devices with an older OS version? Obviously if the hardware permits.

Has anyone figured out a way to control amplitude now, aside from varying pulse width? The system is obviously able to control it as there are vibration strength sliders in the settings for many devices.

Update: The answer is generally "yes" if the device is able to run OS 8.0 natively. There is no backwards compatibility for older OS versions, i.e., you can use VibrationEffect on 8.0+ but you're limited to regular vibrate on 7.0 and lower.

  • 1
    If you are asking if they are going to add things/make changes to older SDK versions the answer is no – tyczj Jul 13 '17 at 20:33
  • @tyczj No, i'm wondering if it's possible for them to support it through whatever low-level calls they currently use to adjust vibe strength. Sort of like they did with ContextCompat to check permissions and request runtime permissions. – AardvarkBlue Jul 13 '17 at 21:00
  • ContextCompat just does API checking for you and is no different than you checking what sdk version the device your app is running on and doing specific API calls based on the sdk version. It does not add functionality to older api's – tyczj Jul 13 '17 at 23:49

1 Answers1

1

Vibration strength sliders usually control the duration of system vibrations, like the duration of a button click vibration, but don't control the actual strength. This API is mainly intended for new vibration systems introduced in new phones like the S8 which are able to emulate a real click. Only hardware capable phones will have this API, for example, my Nexus 6P isn't compatible with it and I doubt if the Pixel phones a