From d285e2ae394145123cdbf2a55b14bf1f4993df05 Mon Sep 17 00:00:00 2001 From: Jhen Date: Sun, 1 Oct 2023 10:46:54 +0800 Subject: [PATCH] fix(android): add empty methods to pass new arch build --- .../java/com/rnwhisper/RNWhisperModule.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/android/src/newarch/java/com/rnwhisper/RNWhisperModule.java b/android/src/newarch/java/com/rnwhisper/RNWhisperModule.java index cc96fc9..bb87857 100644 --- a/android/src/newarch/java/com/rnwhisper/RNWhisperModule.java +++ b/android/src/newarch/java/com/rnwhisper/RNWhisperModule.java @@ -6,6 +6,7 @@ import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReactMethod; import com.facebook.react.bridge.ReadableMap; +import com.facebook.react.bridge.ReadableArray; import com.facebook.react.module.annotations.ReactModule; import java.util.HashMap; @@ -65,4 +66,29 @@ public void releaseContext(double id, Promise promise) { public void releaseAllContexts(Promise promise) { rnwhisper.releaseAllContexts(promise); } + + /* + * iOS Specific methods, left here for make the turbo module happy: + */ + + @ReactMethod + public void getAudioSessionCurrentCategory(Promise promise) { + promise.resolve(null); + } + @ReactMethod + public void getAudioSessionCurrentMode(Promise promise) { + promise.resolve(null); + } + @ReactMethod + public void setAudioSessionCategory(String category, ReadableArray options, Promise promise) { + promise.resolve(null); + } + @ReactMethod + public void setAudioSessionMode(String mode, Promise promise) { + promise.resolve(null); + } + @ReactMethod + public void setAudioSessionActive(boolean active, Promise promise) { + promise.resolve(null); + } }