Mike Bryant
Mike Bryant

Reputation: 2475

Can you increase vibrator strength on android devices?

Is it possible to increase the strength of the alarm vibration?

Upvotes: 6

Views: 10300

Answers (3)

Angel Koh
Angel Koh

Reputation: 13525

from API 26 onwards, you can change the strength by setting the amplitude of VibrationEffect

https://developer.android.com/reference/android/os/VibrationEffect.html

simply create VibrationEffect effect = VibrationEffect.createOneShot ( milliseconds, amplitude);

and then set the effect in the vibrator instance.

vibrator.vibrate(effect);

more details here

https://developer.android.com/reference/android/os/Vibrator.html#vibrate(android.os.VibrationEffect)

Upvotes: 0

Angel Koh
Angel Koh

Reputation: 13525

apparently not,

under android.os.Vibrator, you can set the pattern as well as the duration

vibrate(long[] pattern, int repeat)

vibrate(long milliseconds) 

my guess is that different patterns can be used to "simulate" a stronger vibrate. (on,off,on,off) rather than (on, off, off, off, on).

also a disharmonious pattern may be more effective than a pattern with a fixed rhythm.

Upvotes: 9

Brian Willis
Brian Willis

Reputation: 23894

The Vibrator Class does not allow for this, you can only set the duration.

Upvotes: 3

Related Questions