diff --git a/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/.ninja_log b/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/.ninja_log index 977c5128..643b7e0e 100644 --- a/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/.ninja_log +++ b/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/.ninja_log @@ -43,3 +43,4 @@ 13581 29068 8089360311753360 rnsvg_autolinked_build/CMakeFiles/react_codegen_rnsvg.dir/ed4baae83e9195c96c883bf313e2f3f9/android/build/generated/source/codegen/jni/react/renderer/components/rnsvg/Props.cpp.o 5c071a6c4e62fa8e 29068 29180 8089360313134773 C:/GitHub/Schnappix/android/app/build/intermediates/cxx/RelWithDebInfo/3x5j4n2e/obj/arm64-v8a/libreact_codegen_rnsvg.so 3f1a32ff06dfb001 29181 29326 8089360314514474 C:/GitHub/Schnappix/android/app/build/intermediates/cxx/RelWithDebInfo/3x5j4n2e/obj/arm64-v8a/libappmodules.so 22f7dfe7517aece +25 61 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 415ced1f..9d8133d0 100644 --- a/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/configure_fingerprint.bin +++ b/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/configure_fingerprint.bin @@ -2,31 +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 +t +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  ¤›�û�4 ³ +¯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 +s +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³ ° -­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 fc97288c..71635bdd 100644 --- a/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/.ninja_log +++ b/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/.ninja_log @@ -43,3 +43,4 @@ 5163 20935 8089360557942405 rnsvg_autolinked_build/CMakeFiles/react_codegen_rnsvg.dir/b27a5e984ce42aaf944331ae62f1045c/build/generated/source/codegen/jni/react/renderer/components/rnsvg/Props.cpp.o 45386128c3316239 20936 21058 8089360559499659 C:/GitHub/Schnappix/android/app/build/intermediates/cxx/RelWithDebInfo/3x5j4n2e/obj/armeabi-v7a/libreact_codegen_rnsvg.so 9b90bcb36f3c3b1c 21058 21195 8089360560811989 C:/GitHub/Schnappix/android/app/build/intermediates/cxx/RelWithDebInfo/3x5j4n2e/obj/armeabi-v7a/libappmodules.so 7a2dfc40ee7e94c1 +3 27 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 ef44d5a4..c38bca29 100644 --- a/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/configure_fingerprint.bin +++ b/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/configure_fingerprint.bin @@ -2,31 +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 +t +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  ò¨ƒû�4 ³ +¯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 +s +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³ ° -­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 0a375712..154c19bb 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 41 - versionName "23.01.41" + versionCode 42 + versionName "23.01.42" buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\"" } diff --git a/apks/Schnappix_v23.01.42.aab b/apks/Schnappix_v23.01.42.aab new file mode 100644 index 00000000..cd0699e3 Binary files /dev/null and b/apks/Schnappix_v23.01.42.aab differ diff --git a/apks/Schnappix_v23.01.42.apk b/apks/Schnappix_v23.01.42.apk new file mode 100644 index 00000000..c45fa867 --- /dev/null +++ b/apks/Schnappix_v23.01.42.apk @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d47b895a51c0f822c27910702d305b3f1f4dda4ee666b3421914a0bbdbf768f0 +size 116898223 diff --git a/app.json b/app.json index 3adc30dd..77b98634 100644 --- a/app.json +++ b/app.json @@ -3,7 +3,7 @@ "newArchEnabled": true, "name": "Schnappix", "slug": "Schnappix", - "version": "23.01.41", + "version": "23.01.42", "orientation": "landscape", "icon": "./Icon.png", "userInterfaceStyle": "dark", @@ -13,7 +13,7 @@ }, "android": { "package": "de.orfel.schnappix", - "versionCode": 41, + "versionCode": 42, "usesCleartextTraffic": true, "adaptiveIcon": { "backgroundColor": "#050510", 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 40732351..7bd68a9c 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 @@ -24,6 +24,9 @@ class UsbCameraView(context: Context, appContext: AppContext) : ExpoView(context private val onCameraError by EventDispatcher() private val onCameraState by EventDispatcher() + private var permissionReceiver: android.content.BroadcastReceiver? = null + private var registeredContext: Context? = null + init { textureView = AspectRatioTextureView(context) addView(textureView, LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)) @@ -65,7 +68,7 @@ class UsbCameraView(context: Context, appContext: AppContext) : ExpoView(context android.util.Log.e("UsbCameraView", "Error checking USB devices: ${e.message}", e) } - val permissionReceiver = object : android.content.BroadcastReceiver() { + permissionReceiver = object : android.content.BroadcastReceiver() { override fun onReceive(context: Context, intent: android.content.Intent) { if ("com.schnappix.USB_PERMISSION" == intent.action) { synchronized(this) { @@ -82,6 +85,7 @@ class UsbCameraView(context: Context, appContext: AppContext) : ExpoView(context } val filter = android.content.IntentFilter("com.schnappix.USB_PERMISSION") + registeredContext = activityContext if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.TIRAMISU) { activityContext.registerReceiver(permissionReceiver, filter, Context.RECEIVER_EXPORTED) } else { @@ -206,6 +210,16 @@ class UsbCameraView(context: Context, appContext: AppContext) : ExpoView(context } fun onDestroy() { + try { + permissionReceiver?.let { + registeredContext?.unregisterReceiver(it) + } + } catch (e: Exception) { + e.printStackTrace() + } + permissionReceiver = null + registeredContext = null + try { cameraClient?.closeCamera() } catch (e: Exception) { diff --git a/package.json b/package.json index af4a7edd..210e4c25 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "schnappix", - "version": "23.01.41", + "version": "23.01.42", "main": "index.ts", "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.7.2", diff --git a/src/screens/CameraScreen.tsx b/src/screens/CameraScreen.tsx index 1c3520af..89c6cca1 100644 --- a/src/screens/CameraScreen.tsx +++ b/src/screens/CameraScreen.tsx @@ -192,6 +192,10 @@ export default function CameraScreen({ console.error('Failed to get USB Camera logcat:', logErr); } } + } else { + if (isUsbConnected) { + setIsUsbConnected(false); + } } } catch (e: any) { logger.error(`Error checking USB connection:\n Name: ${e.name}\n Message: ${e.message}\n Stack: ${e.stack}`); @@ -703,8 +707,8 @@ export default function CameraScreen({ {Platform.OS === 'android' ? ( <> - {/* Mount USB camera only if we are not forcing the front camera */} - {!useFrontCamera && ( + {/* Mount USB camera only if we are not forcing the front camera and it is not obscured by PreviewScreen */} + {!useFrontCamera && !isObscured && (