From 1294a00ee71559627bb356b72049d696c96569b2 Mon Sep 17 00:00:00 2001 From: Stanislav Dmitrenko <7953703+avently@users.noreply.github.com> Date: Mon, 5 Dec 2022 17:56:37 +0300 Subject: [PATCH] android: Vibration pattern (#1504) * android: Vibration pattern * update pattern Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> --- .../app/src/main/java/chat/simplex/app/model/NtfManager.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/android/app/src/main/java/chat/simplex/app/model/NtfManager.kt b/apps/android/app/src/main/java/chat/simplex/app/model/NtfManager.kt index 36963e3e4b..1dc71ef292 100644 --- a/apps/android/app/src/main/java/chat/simplex/app/model/NtfManager.kt +++ b/apps/android/app/src/main/java/chat/simplex/app/model/NtfManager.kt @@ -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 }