From 884996ca713170047fb12b30977461377c920006 Mon Sep 17 00:00:00 2001 From: Alessandro Ferro <49845537+xfarrow@users.noreply.github.com> Date: Thu, 27 Oct 2022 12:55:31 +0200 Subject: [PATCH] Add vibration when ringing --- src/app/src/main/AndroidManifest.xml | 2 ++ .../locatemydevice/RingerActivity.java | 22 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/app/src/main/AndroidManifest.xml b/src/app/src/main/AndroidManifest.xml index b30d1a0..7c52a6e 100644 --- a/src/app/src/main/AndroidManifest.xml +++ b/src/app/src/main/AndroidManifest.xml @@ -13,6 +13,8 @@ + + = Build.VERSION_CODES.O) { + v.vibrate(VibrationEffect.createWaveform(pattern, 0)); + } + else{ + v.vibrate(pattern,0); + } } private void stopRinging(){ ringtoneManager.stop(); + v.cancel(); finishAffinity(); }