diff --git a/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/.ninja_log b/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/.ninja_log index d00b1414..81129df6 100644 --- a/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/.ninja_log +++ b/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/.ninja_log @@ -58,3 +58,4 @@ 3 28 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/CMakeFiles/cmake.verify_globs 5250f1b80cb55465 9 60 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/CMakeFiles/cmake.verify_globs 5250f1b80cb55465 5 48 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/CMakeFiles/cmake.verify_globs 5250f1b80cb55465 +22 65 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/CMakeFiles/cmake.verify_globs 5250f1b80cb55465 diff --git a/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/configure_fingerprint.bin b/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/configure_fingerprint.bin index c1ffc278..81f8ea38 100644 --- a/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/configure_fingerprint.bin +++ b/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/configure_fingerprint.bin @@ -2,41 +2,41 @@ C/C++ Structured Logg e cC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\additional_project_files.txtC A -?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  £Ý¹Ê‚4Å, Ö˜�û�4d +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  �‹ªÎ‚4Å, Ö˜�û�4d b -`C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\android_gradle_build.json  £Ý¹Ê‚4û" ݘ�û�4i +`C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\android_gradle_build.json  �‹ªÎ‚4û" ݘ�û�4i g -eC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\android_gradle_build_mini.json  £Ý¹Ê‚4ï óš�û�4V +eC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\android_gradle_build_mini.json  �‹ªÎ‚4ï óš�û�4V T -RC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\build.ninja  £Ý¹Ê‚4œÞ ¹“�û�4Z +RC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\build.ninja  �‹ªÎ‚4œÞ ¹“�û�4Z X -VC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\build.ninja.txt  £Ý¹Ê‚4_ +VC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\build.ninja.txt  �‹ªÎ‚4_ ] -[C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\build_file_index.txt  £Ý¹Ê‚4� €›�û�4` +[C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\build_file_index.txt  �‹ªÎ‚4� €›�û�4` ^ -\C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\compile_commands.json  £Ý¹Ê‚4‘Ø µ“�û�4d +\C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\compile_commands.json  �‹ªÎ‚4‘Ø µ“�û�4d b -`C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\compile_commands.json.bin  £Ý¹Ê‚4 Ê„ µ“�û�4j +`C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\compile_commands.json.bin  �‹ªÎ‚4 Ê„ µ“�û�4j h -fC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\metadata_generation_command.txt  ¤Ý¹Ê‚4 +fC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\metadata_generation_command.txt  �‹ªÎ‚4 ¸ þš�û�4] [ -YC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\prefab_config.json  ¤Ý¹Ê‚4 € þš�û�4b +YC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\prefab_config.json  �‹ªÎ‚4 € þš�û�4b ` -^C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\symbol_folder_index.txt  ¤Ý¹Ê‚4  ] þš�û�4{ +^C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\symbol_folder_index.txt  �‹ªÎ‚4  ] þš�û�4{ y -wC:\GitHub\Schnappix\node_modules\react-native-gesture-handler\android\build\generated\source\codegen\jni\CMakeLists.txt  ¤Ý¹Ê‚4 ¾ Á‚ùú�4v +wC:\GitHub\Schnappix\node_modules\react-native-gesture-handler\android\build\generated\source\codegen\jni\CMakeLists.txt  �‹ªÎ‚4 ¾ Á‚ùú�4v t -rC:\GitHub\Schnappix\node_modules\react-native-reanimated\android\build\generated\source\codegen\jni\CMakeLists.txt  ¤Ý¹Ê‚4ö ¨‚ùú�4µ +rC:\GitHub\Schnappix\node_modules\react-native-reanimated\android\build\generated\source\codegen\jni\CMakeLists.txt  �‹ªÎ‚4ö ¨‚ùú�4µ ² -¯C:\GitHub\Schnappix\node_modules\react-native-reanimated\android\build\intermediates\prefab_package_configuration\release\prefabReleaseConfigurePackage\prefab_publication.json  ¤Ý¹Ê‚4Y +¯C:\GitHub\Schnappix\node_modules\react-native-reanimated\android\build\intermediates\prefab_package_configuration\release\prefabReleaseConfigurePackage\prefab_publication.json  �‹ªÎ‚4Y W -UC:\GitHub\Schnappix\node_modules\react-native-svg\android\src\main\jni\CMakeLists.txt  ¤Ý¹Ê‚4½ œ§ØÖç3u +UC:\GitHub\Schnappix\node_modules\react-native-svg\android\src\main\jni\CMakeLists.txt  �‹ªÎ‚4½ œ§ØÖç3u s -qC:\GitHub\Schnappix\node_modules\react-native-view-shot\android\build\generated\source\codegen\jni\CMakeLists.txt  ¤Ý¹Ê‚4ê §‚ùú�4t +qC:\GitHub\Schnappix\node_modules\react-native-view-shot\android\build\generated\source\codegen\jni\CMakeLists.txt  �‹ªÎ‚4ê §‚ùú�4t r -pC:\GitHub\Schnappix\node_modules\react-native-worklets\android\build\generated\source\codegen\jni\CMakeLists.txt  ¤Ý¹Ê‚4ê ¨‚ùú�4³ +pC:\GitHub\Schnappix\node_modules\react-native-worklets\android\build\generated\source\codegen\jni\CMakeLists.txt  �‹ªÎ‚4ê ¨‚ùú�4³ ° -­C:\GitHub\Schnappix\node_modules\react-native-worklets\android\build\intermediates\prefab_package_configuration\release\prefabReleaseConfigurePackage\prefab_publication.json  ¤Ý¹Ê‚4k +­C:\GitHub\Schnappix\node_modules\react-native-worklets\android\build\intermediates\prefab_package_configuration\release\prefabReleaseConfigurePackage\prefab_publication.json  �‹ªÎ‚4k i -gC:\GitHub\Schnappix\node_modules\react-native\ReactAndroid\cmake-utils\default-app-setup\CMakeLists.txt  ¤Ý¹Ê‚4ð ®¡ÈÑç3 \ No newline at end of file +gC:\GitHub\Schnappix\node_modules\react-native\ReactAndroid\cmake-utils\default-app-setup\CMakeLists.txt  �‹ªÎ‚4ð ®¡ÈÑç3 \ No newline at end of file diff --git a/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/.ninja_log b/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/.ninja_log index f7fa180a..b0cbb7fa 100644 --- a/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/.ninja_log +++ b/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/.ninja_log @@ -58,3 +58,4 @@ 2 30 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/CMakeFiles/cmake.verify_globs 1eb2d1da6ebc2e74 3 43 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/CMakeFiles/cmake.verify_globs 1eb2d1da6ebc2e74 4 34 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/CMakeFiles/cmake.verify_globs 1eb2d1da6ebc2e74 +2 48 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/CMakeFiles/cmake.verify_globs 1eb2d1da6ebc2e74 diff --git a/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/configure_fingerprint.bin b/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/configure_fingerprint.bin index 75c72725..ee79d158 100644 --- a/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/configure_fingerprint.bin +++ b/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/configure_fingerprint.bin @@ -2,41 +2,41 @@ C/C++ Structured Logi g eC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\additional_project_files.txtC A -?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  øÝ¹Ê‚4ý, ¯¨ƒû�4f +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ÷�ªÎ‚4ý, ¯¨ƒû�4f d -bC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\android_gradle_build.json  øÝ¹Ê‚4�# ±¨ƒû�4k +bC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\android_gradle_build.json  ÷�ªÎ‚4�# ±¨ƒû�4k i -gC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\android_gradle_build_mini.json  øÝ¹Ê‚4‘ 訃û�4X +gC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\android_gradle_build_mini.json  ÷�ªÎ‚4‘ 訃û�4X V -TC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\build.ninja  øÝ¹Ê‚4Áå ¾¥ƒû�4\ +TC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\build.ninja  ÷�ªÎ‚4Áå ¾¥ƒû�4\ Z -XC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\build.ninja.txt  ùݹʂ4a +XC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\build.ninja.txt  ÷�ªÎ‚4a _ -]C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\build_file_index.txt  ùݹʂ4� ꨃû�4b +]C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\build_file_index.txt  ÷�ªÎ‚4� ꨃû�4b ` -^C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\compile_commands.json  ùݹʂ4´à »¥ƒû�4f +^C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\compile_commands.json  ÷�ªÎ‚4´à »¥ƒû�4f d -bC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\compile_commands.json.bin  ùݹʂ4 ò„ »¥ƒû�4l +bC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\compile_commands.json.bin  ÷�ªÎ‚4 ò„ »¥ƒû�4l j -hC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\metadata_generation_command.txt  ùݹʂ4 +hC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\metadata_generation_command.txt  ÷�ªÎ‚4 Ä è¨ƒû�4_ ] -[C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\prefab_config.json  ùݹʂ4 € 騃û�4d +[C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\prefab_config.json  ÷�ªÎ‚4 € 騃û�4d b -`C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\symbol_folder_index.txt  ùݹʂ4  _ ꨃû�4{ +`C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\symbol_folder_index.txt  ÷�ªÎ‚4  _ ꨃû�4{ y -wC:\GitHub\Schnappix\node_modules\react-native-gesture-handler\android\build\generated\source\codegen\jni\CMakeLists.txt  ùݹʂ4 ¾ Á‚ùú�4v +wC:\GitHub\Schnappix\node_modules\react-native-gesture-handler\android\build\generated\source\codegen\jni\CMakeLists.txt  ÷�ªÎ‚4 ¾ Á‚ùú�4v t -rC:\GitHub\Schnappix\node_modules\react-native-reanimated\android\build\generated\source\codegen\jni\CMakeLists.txt  ùݹʂ4ö ¨‚ùú�4µ +rC:\GitHub\Schnappix\node_modules\react-native-reanimated\android\build\generated\source\codegen\jni\CMakeLists.txt  ÷�ªÎ‚4ö ¨‚ùú�4µ ² -¯C:\GitHub\Schnappix\node_modules\react-native-reanimated\android\build\intermediates\prefab_package_configuration\release\prefabReleaseConfigurePackage\prefab_publication.json  ùݹʂ4Y +¯C:\GitHub\Schnappix\node_modules\react-native-reanimated\android\build\intermediates\prefab_package_configuration\release\prefabReleaseConfigurePackage\prefab_publication.json  ÷�ªÎ‚4Y W -UC:\GitHub\Schnappix\node_modules\react-native-svg\android\src\main\jni\CMakeLists.txt  ùݹʂ4½ œ§ØÖç3u +UC:\GitHub\Schnappix\node_modules\react-native-svg\android\src\main\jni\CMakeLists.txt  ÷�ªÎ‚4½ œ§ØÖç3u s -qC:\GitHub\Schnappix\node_modules\react-native-view-shot\android\build\generated\source\codegen\jni\CMakeLists.txt  ùݹʂ4ê §‚ùú�4t +qC:\GitHub\Schnappix\node_modules\react-native-view-shot\android\build\generated\source\codegen\jni\CMakeLists.txt  ÷�ªÎ‚4ê §‚ùú�4t r -pC:\GitHub\Schnappix\node_modules\react-native-worklets\android\build\generated\source\codegen\jni\CMakeLists.txt  ùݹʂ4ê ¨‚ùú�4³ +pC:\GitHub\Schnappix\node_modules\react-native-worklets\android\build\generated\source\codegen\jni\CMakeLists.txt  ÷�ªÎ‚4ê ¨‚ùú�4³ ° -­C:\GitHub\Schnappix\node_modules\react-native-worklets\android\build\intermediates\prefab_package_configuration\release\prefabReleaseConfigurePackage\prefab_publication.json  ùݹʂ4k +­C:\GitHub\Schnappix\node_modules\react-native-worklets\android\build\intermediates\prefab_package_configuration\release\prefabReleaseConfigurePackage\prefab_publication.json  ÷�ªÎ‚4k i -gC:\GitHub\Schnappix\node_modules\react-native\ReactAndroid\cmake-utils\default-app-setup\CMakeLists.txt  ùݹʂ4ð ®¡ÈÑç3 \ No newline at end of file +gC:\GitHub\Schnappix\node_modules\react-native\ReactAndroid\cmake-utils\default-app-setup\CMakeLists.txt  ÷�ªÎ‚4ð ®¡ÈÑç3 \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index 4978d003..433886b4 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -92,8 +92,8 @@ android { applicationId 'de.orfel.schnappix' minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 53 - versionName "23.01.53" + versionCode 54 + versionName "23.01.54" buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\"" } diff --git a/apks/Schnappix_v23.01.54.aab b/apks/Schnappix_v23.01.54.aab new file mode 100644 index 00000000..03df8e16 Binary files /dev/null and b/apks/Schnappix_v23.01.54.aab differ diff --git a/apks/Schnappix_v23.01.54.apk b/apks/Schnappix_v23.01.54.apk new file mode 100644 index 00000000..6ec9a708 --- /dev/null +++ b/apks/Schnappix_v23.01.54.apk @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a07e81a03b41baaae50cfb56734ca66a98ccc9be4bb88dfaf6e3b1b73b6a5d95 +size 116898935 diff --git a/app.json b/app.json index 03d9101f..69654630 100644 --- a/app.json +++ b/app.json @@ -3,7 +3,7 @@ "newArchEnabled": true, "name": "Schnappix", "slug": "Schnappix", - "version": "23.01.53", + "version": "23.01.54", "orientation": "landscape", "icon": "./Icon.png", "userInterfaceStyle": "dark", @@ -13,7 +13,7 @@ }, "android": { "package": "de.orfel.schnappix", - "versionCode": 53, + "versionCode": 54, "usesCleartextTraffic": true, "adaptiveIcon": { "backgroundColor": "#050510", diff --git a/modules/usb-camera/android/src/main/java/expo/modules/usbcamera/UsbCameraModule.kt b/modules/usb-camera/android/src/main/java/expo/modules/usbcamera/UsbCameraModule.kt index d0938562..2d21dad8 100644 --- a/modules/usb-camera/android/src/main/java/expo/modules/usbcamera/UsbCameraModule.kt +++ b/modules/usb-camera/android/src/main/java/expo/modules/usbcamera/UsbCameraModule.kt @@ -50,6 +50,11 @@ class UsbCameraModule : Module() { promise.resolve(view.isCameraConnected()) } + AsyncFunction("restartPreview") { view: UsbCameraView, promise: Promise -> + view.restartPreview() + promise.resolve(true) + } + OnViewDestroys { view -> view.onDestroy() } diff --git a/modules/usb-camera/android/src/main/java/expo/modules/usbcamera/UsbCameraView.kt b/modules/usb-camera/android/src/main/java/expo/modules/usbcamera/UsbCameraView.kt index 60d5c0e7..46ac6dcb 100644 --- a/modules/usb-camera/android/src/main/java/expo/modules/usbcamera/UsbCameraView.kt +++ b/modules/usb-camera/android/src/main/java/expo/modules/usbcamera/UsbCameraView.kt @@ -224,6 +224,16 @@ class UsbCameraView(context: Context, appContext: AppContext) : ExpoView(context return cameraClient?.isCameraOpened() ?: false } + fun restartPreview() { + try { + if (cameraClient != null) { + cameraClient?.openCamera(textureView) + } + } catch (e: Exception) { + e.printStackTrace() + } + } + fun onDestroy() { try { permissionReceiver?.let { diff --git a/modules/usb-camera/index.ts b/modules/usb-camera/index.ts index 07adfc22..04387d4b 100644 --- a/modules/usb-camera/index.ts +++ b/modules/usb-camera/index.ts @@ -19,6 +19,7 @@ export interface UsbCameraViewProps extends ViewProps { export interface UsbCameraRef { takePicture(savePath: string): Promise; isCameraConnected(): Promise; + restartPreview(): Promise; } // Export the native view manager component diff --git a/package.json b/package.json index 33e43481..194c5373 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "schnappix", - "version": "23.01.53", + "version": "23.01.54", "main": "index.ts", "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.7.2", diff --git a/src/screens/AdminScreen.tsx b/src/screens/AdminScreen.tsx index 314f08a0..73a6f637 100644 --- a/src/screens/AdminScreen.tsx +++ b/src/screens/AdminScreen.tsx @@ -726,7 +726,7 @@ export default function AdminScreen({ currentSettings, onSave, onClose }: AdminS const styles = StyleSheet.create({ container: { flex: 1, - backgroundColor: THEME.colors.background, + backgroundColor: 'rgba(10, 10, 20, 0.99)', }, headerRow: { flexDirection: 'row', diff --git a/src/screens/CameraScreen.tsx b/src/screens/CameraScreen.tsx index 07b5b3ff..89e709ba 100644 --- a/src/screens/CameraScreen.tsx +++ b/src/screens/CameraScreen.tsx @@ -128,8 +128,18 @@ export default function CameraScreen({ const isObscuredRef = useRef(isObscured); useEffect(() => { + const wasObscured = isObscuredRef.current; isObscuredRef.current = isObscured; - }, [isObscured]); + + // If we just became visible again (e.g. returning from PreviewScreen or AdminScreen) + if (wasObscured && !isObscured) { + if (usbCameraRef.current && isUsbConnected) { + usbCameraRef.current.restartPreview().catch(e => { + logger.error('Failed to restart preview natively', e); + }); + } + } + }, [isObscured, isUsbConnected]); const { width } = useWindowDimensions(); const iconSize = width < 768 ? 18 : 32; @@ -731,10 +741,7 @@ export default function CameraScreen({ {!useFrontCamera && ( { logger.log('USB Camera is fully ready.'); }} diff --git a/src/screens/PreviewScreen.tsx b/src/screens/PreviewScreen.tsx index 30d541bc..e0b5c675 100644 --- a/src/screens/PreviewScreen.tsx +++ b/src/screens/PreviewScreen.tsx @@ -684,7 +684,7 @@ export default function PreviewScreen({ const styles = StyleSheet.create({ container: { flex: 1, - backgroundColor: THEME.colors.background, + backgroundColor: 'rgba(10, 10, 20, 0.99)', }, previewPanel: { justifyContent: 'flex-start',