diff --git a/packages/react-native-external-display/android/src/newarch/java/com/externaldisplay/RNExternalDisplayModule.java b/packages/react-native-external-display/android/src/newarch/java/com/externaldisplay/RNExternalDisplayModule.java index 3a4c386f..9bda6bc1 100644 --- a/packages/react-native-external-display/android/src/newarch/java/com/externaldisplay/RNExternalDisplayModule.java +++ b/packages/react-native-external-display/android/src/newarch/java/com/externaldisplay/RNExternalDisplayModule.java @@ -3,6 +3,7 @@ import android.content.Context; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReactMethod; +import com.facebook.react.bridge.ReadableMap; import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.Arguments; @@ -37,4 +38,18 @@ public WritableMap getInitialScreens() { @Override public void init() {} + + // --- Mock methods (from iOS) --- + + @Override + public boolean requestScene(ReadableMap options) { return false; } + + @Override + public boolean closeScene(String sceneId) { return false; } + + @Override + public boolean isMainSceneActive() { return false; } + + @Override + public boolean resumeMainScene() { return false; } } \ No newline at end of file diff --git a/packages/react-native-external-display/android/src/oldarch/java/com/externaldisplay/RNExternalDisplayModule.java b/packages/react-native-external-display/android/src/oldarch/java/com/externaldisplay/RNExternalDisplayModule.java index 8272f4f8..45716892 100644 --- a/packages/react-native-external-display/android/src/oldarch/java/com/externaldisplay/RNExternalDisplayModule.java +++ b/packages/react-native-external-display/android/src/oldarch/java/com/externaldisplay/RNExternalDisplayModule.java @@ -4,6 +4,7 @@ import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReactContextBaseJavaModule; import com.facebook.react.bridge.ReactMethod; +import com.facebook.react.bridge.ReadableMap; import android.view.Display; import android.hardware.display.DisplayManager; @@ -33,4 +34,18 @@ public Map getConstants() { map.put("SCREEN_INFO", ExternalDisplayHelper.getScreenInfo(dm.getDisplays())); return map; } + + // --- Mock methods (from iOS) --- + + @Override + public boolean requestScene(ReadableMap options) { return false; } + + @Override + public boolean closeScene(String sceneId) { return false; } + + @Override + public boolean isMainSceneActive() { return false; } + + @Override + public boolean resumeMainScene() { return false; } } \ No newline at end of file diff --git a/packages/react-native-external-display/js/NativeRNExternalDisplayEvent.android.js b/packages/react-native-external-display/js/NativeRNExternalDisplayEvent.android.js deleted file mode 100644 index a8db4823..00000000 --- a/packages/react-native-external-display/js/NativeRNExternalDisplayEvent.android.js +++ /dev/null @@ -1,10 +0,0 @@ -// @flow strict-local -import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport' -import { TurboModuleRegistry } from 'react-native' - -export interface Spec extends TurboModule { - getInitialScreens: () => {||}, - init: () => void, -} - -export default (TurboModuleRegistry.get('RNExternalDisplayEvent'): ?Spec) diff --git a/packages/react-native-external-display/js/NativeRNExternalDisplayEvent.ios.js b/packages/react-native-external-display/js/NativeRNExternalDisplayEvent.js similarity index 94% rename from packages/react-native-external-display/js/NativeRNExternalDisplayEvent.ios.js rename to packages/react-native-external-display/js/NativeRNExternalDisplayEvent.js index b9c1c1ee..8abc733a 100644 --- a/packages/react-native-external-display/js/NativeRNExternalDisplayEvent.ios.js +++ b/packages/react-native-external-display/js/NativeRNExternalDisplayEvent.js @@ -6,7 +6,7 @@ export interface Spec extends TurboModule { getInitialScreens: () => {||}, init: () => void, - // Scene API + // Scene API (iOS only) requestScene: (options: {}) => boolean, closeScene: (sceneId: string) => boolean, isMainSceneActive: () => boolean, diff --git a/packages/react-native-external-display/js/SceneManager.js b/packages/react-native-external-display/js/SceneManager.js index a75ee602..4c50916f 100644 --- a/packages/react-native-external-display/js/SceneManager.js +++ b/packages/react-native-external-display/js/SceneManager.js @@ -1,4 +1,4 @@ -import RNExternalDisplayEvent from './NativeRNExternalDisplayEvent.android' +import RNExternalDisplayEvent from './NativeRNExternalDisplayEvent' const sceneTypes = { EXTERNAL_DISPLAY: '@RNExternalDisplay_externalDisplay',