RichUtils / pyxis.uzuki.live.richutilskt.utils / getVibratorPattern

getVibratorPattern

fun getVibratorPattern(intensity: Intensity, duration: Long): LongArray

get Intensity (Desired Strength) of Vibrate NOTE: Some device's default value may 0.7f (Tested in Galaxy S6),

Parameters

intensity - Desired strength of vibration. There are 5 Options.

duration - Time to vibrate.

Return
long[] array of Pattern of Vibrate.

fun getVibratorPattern(intensity: Float, duration: Long): LongArray

get Intensity (Desired Strength) of Vibrate Normal Way, just use getVibratorPattern(Intensity, long) for easy work.

Parameters

intensity - Float value. Range is 0.0f ~ 1.0f

duration - Time to vibrate

Return
long[] array of Pattern of Vibrate