From 066d2bc06351981840963eb90be2166012215725 Mon Sep 17 00:00:00 2001 From: Claudio Nicora Date: Fri, 28 Jun 2024 16:54:23 +0200 Subject: [PATCH] fix(android): don't request audio focus on load (#89) Co-authored-by: jcesarmobile --- .../java/com/getcapacitor/community/audio/NativeAudio.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/android/src/main/java/com/getcapacitor/community/audio/NativeAudio.java b/android/src/main/java/com/getcapacitor/community/audio/NativeAudio.java index 0b0035c..4043be3 100644 --- a/android/src/main/java/com/getcapacitor/community/audio/NativeAudio.java +++ b/android/src/main/java/com/getcapacitor/community/audio/NativeAudio.java @@ -54,9 +54,6 @@ public void load() { super.load(); this.audioManager = (AudioManager) getBridge().getActivity().getSystemService(Context.AUDIO_SERVICE); - if (this.audioManager != null) { - this.audioManager.requestAudioFocus(this, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN); - } } @Override