android: Vibration pattern (#1504)

* android: Vibration pattern

* update pattern

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
This commit is contained in:
Stanislav Dmitrenko
2022-12-05 14:56:37 +00:00
committed by GitHub
co-authored by Evgeny Poberezkin
parent 0a8069ada2
commit 1294a00ee7
@@ -59,6 +59,9 @@ class NtfManager(val context: Context, private val appPreferences: AppPreference
Log.d(TAG,"callNotificationChannel sound: $soundUri")
callChannel.setSound(soundUri, attrs)
callChannel.enableVibration(true)
// the numbers below are explained here: https://developer.android.com/reference/android/os/Vibrator
// (wait, vibration duration, wait till off, wait till on again = ringtone mp3 duration - vibration duration - ~50ms lost somewhere)
callChannel.vibrationPattern = longArrayOf(250, 250, 0, 2600)
return callChannel
}