Fix logger.warn crash and ensure UsbCameraView is always mounted to request permissions

This commit is contained in:
Jannik committed 2026-08-18 18:23:38 +02:00
1 parent 513f713a29
commit 0cbded2964
12 files changed
+87 -46

No files matched your search

@@ -54,3 +54,5 @@
7 70 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/CMakeFiles/cmake.verify_globs 5250f1b80cb55465
4 51 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/CMakeFiles/cmake.verify_globs 5250f1b80cb55465
4 48 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/CMakeFiles/cmake.verify_globs 5250f1b80cb55465
27 85 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/CMakeFiles/cmake.verify_globs 5250f1b80cb55465
5 38 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/CMakeFiles/cmake.verify_globs 5250f1b80cb55465
@@ -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Å, ½Ñªðò3d
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ‹ªþª�4Å, ½Ñªðò3d
b
`C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\android_gradle_build.json  û”Ñš�4û" ÂѪðò3i
`C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\android_gradle_build.json  ‹ªþª�4û" ÂѪðò3i
g
eC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\android_gradle_build_mini.json  û”Ñš�4ï  Òªðò3V
eC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\android_gradle_build_mini.json  ‹ªþª�4ï  Òªðò3V
T
RC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\build.ninja  û”Ñš�4œÞ åͪðò3Z
RC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\build.ninja  ‹ªþª�4œÞ åͪðò3Z
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� ¨Òªðò3`
[C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\build_file_index.txt  ‹ªþª�4� ¨Òªðò3`
^
\C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\compile_commands.json  û”Ñš�4‘Ø ãͪðò3d
\C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\compile_commands.json  ‹ªþª�4‘Ø ãͪðò3d
b
`C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\compile_commands.json.bin  û”Ñš�4 Ê„ ãͪðò3j
`C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\compile_commands.json.bin  ‹ªþª�4 Ê„ ãͪðò3j
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
¸ §Òªðò3]
[
YC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\prefab_config.json  û”Ñš�4 € ¨Òªðò3b
YC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\prefab_config.json  ‹ªþª�4 € ¨Òªðò3b
`
^C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\symbol_folder_index.txt  û”Ñš�4␍ ] ¨Òªðò3{
^C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\arm64-v8a\symbol_folder_index.txt  ‹ªþª�4␍ ] ¨Òªðò3{
y
wC:\GitHub\Schnappix\node_modules\react-native-gesture-handler\android\build\generated\source\codegen\jni\CMakeLists.txt  û”Ñš�4␍¾ Ü…§ðò3v
wC:\GitHub\Schnappix\node_modules\react-native-gesture-handler\android\build\generated\source\codegen\jni\CMakeLists.txt  ‹ªþª�4␍¾ Ü…§ðò3v
t
rC:\GitHub\Schnappix\node_modules\react-native-reanimated\android\build\generated\source\codegen\jni\CMakeLists.txt  û”Ñš�4ö ùާðò3µ
rC:\GitHub\Schnappix\node_modules\react-native-reanimated\android\build\generated\source\codegen\jni\CMakeLists.txt  ‹ªþª�4ö ùާðò3µ
²
¯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ê ú„§ðò3t
qC:\GitHub\Schnappix\node_modules\react-native-view-shot\android\build\generated\source\codegen\jni\CMakeLists.txt  ‹ªþª�4ê ú„§ðò3t
r
pC:\GitHub\Schnappix\node_modules\react-native-worklets\android\build\generated\source\codegen\jni\CMakeLists.txt  û”Ñš�4ê è„§ðò3³
pC:\GitHub\Schnappix\node_modules\react-native-worklets\android\build\generated\source\codegen\jni\CMakeLists.txt  ‹ªþª�4ê è„§ðò3³
°
­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
gC:\GitHub\Schnappix\node_modules\react-native\ReactAndroid\cmake-utils\default-app-setup\CMakeLists.txt  ‹ªþª�4ð ®¡ÈÑç3
@@ -54,3 +54,5 @@
10 63 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/CMakeFiles/cmake.verify_globs 1eb2d1da6ebc2e74
5 62 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/CMakeFiles/cmake.verify_globs 1eb2d1da6ebc2e74
3 27 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/CMakeFiles/cmake.verify_globs 1eb2d1da6ebc2e74
7 61 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/CMakeFiles/cmake.verify_globs 1eb2d1da6ebc2e74
3 34 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/CMakeFiles/cmake.verify_globs 1eb2d1da6ebc2e74
@@ -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ý, ÷íðò3f
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ë¬þª�4ý, ÷íðò3f
d
bC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\android_gradle_build.json  ö—Ñš�4�# øÃ­ðò3k
bC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\android_gradle_build.json  ë¬þª�4�# øÃ­ðò3k
i
gC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\android_gradle_build_mini.json  ö—Ñš�4‘ ŸÄ­ðò3X
gC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\android_gradle_build_mini.json  ë¬þª�4‘ ŸÄ­ðò3X
V
TC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\build.ninja  ö—Ñš�4Áå âÀ­ðò3\
TC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\build.ninja  ë¬þª�4Áå âÀ­ðò3\
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�  Ä­ðò3b
]C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\build_file_index.txt  ë¬þª�4�  Ä­ðò3b
`
^C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\compile_commands.json  ö—Ñš�4´à àÀ­ðò3f
^C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\compile_commands.json  ë¬þª�4´à àÀ­ðò3f
d
bC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\compile_commands.json.bin  ö—Ñš�4 ò„ àÀ­ðò3l
bC:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\compile_commands.json.bin  ë¬þª�4 ò„ àÀ­ðò3l
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
Ä ŸÄ­ðò3_
]
[C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\prefab_config.json  ö—Ñš�4 € ŸÄ­ðò3d
[C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\prefab_config.json  ë¬þª�4 € ŸÄ­ðò3d
b
`C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\symbol_folder_index.txt  ö—Ñš�4␍ _  Ä­ðò3{
`C:\GitHub\Schnappix\android\app\.cxx\RelWithDebInfo\3x5j4n2e\armeabi-v7a\symbol_folder_index.txt  ë¬þª�4␍ _  Ä­ðò3{
y
wC:\GitHub\Schnappix\node_modules\react-native-gesture-handler\android\build\generated\source\codegen\jni\CMakeLists.txt  ö—Ñš�4␍¾ Ü…§ðò3v
wC:\GitHub\Schnappix\node_modules\react-native-gesture-handler\android\build\generated\source\codegen\jni\CMakeLists.txt  ë¬þª�4␍¾ Ü…§ðò3v
t
rC:\GitHub\Schnappix\node_modules\react-native-reanimated\android\build\generated\source\codegen\jni\CMakeLists.txt  ö—Ñš�4ö ùާðò3µ
rC:\GitHub\Schnappix\node_modules\react-native-reanimated\android\build\generated\source\codegen\jni\CMakeLists.txt  ë¬þª�4ö ùާðò3µ
²
¯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ê ú„§ðò3t
qC:\GitHub\Schnappix\node_modules\react-native-view-shot\android\build\generated\source\codegen\jni\CMakeLists.txt  ë¬þª�4ê ú„§ðò3t
r
pC:\GitHub\Schnappix\node_modules\react-native-worklets\android\build\generated\source\codegen\jni\CMakeLists.txt  ö—Ñš�4ê è„§ðò3³
pC:\GitHub\Schnappix\node_modules\react-native-worklets\android\build\generated\source\codegen\jni\CMakeLists.txt  ë¬þª�4ê è„§ðò3³
°
­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
gC:\GitHub\Schnappix\node_modules\react-native\ReactAndroid\cmake-utils\default-app-setup\CMakeLists.txt  ë¬þª�4ð ®¡ÈÑç3
+2 -2
View File
@@ -92,8 +92,8 @@ android {
applicationId 'de.orfel.schnappix'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 25
versionName "23.01.25"
versionCode 26
versionName "23.01.26"
buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\""
}
+1 -1
View File
@@ -19,7 +19,7 @@
<data android:scheme="https"/>
</intent>
</queries>
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme" android:supportsRtl="true" android:enableOnBackInvokedCallback="false" android:requestLegacyExternalStorage="true">
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme" android:supportsRtl="true" android:enableOnBackInvokedCallback="false" android:requestLegacyExternalStorage="true" android:usesCleartextTraffic="true">
<meta-data android:name="expo.modules.updates.ENABLED" android:value="false"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -3,7 +3,7 @@
"newArchEnabled": true,
"name": "Schnappix",
"slug": "Schnappix",
"version": "23.01.26",
"version": "23.01.27",
"orientation": "landscape",
"icon": "./Icon.png",
"userInterfaceStyle": "dark",
@@ -13,7 +13,7 @@
},
"android": {
"package": "de.orfel.schnappix",
"versionCode": 26,
"versionCode": 27,
"usesCleartextTraffic": true,
"adaptiveIcon": {
"backgroundColor": "#050510",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "schnappix",
"version": "23.01.26",
"version": "23.01.27",
"main": "index.ts",
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.7.2",
+16 -2
View File
@@ -677,13 +677,26 @@ export default function CameraScreen({
{/* Camera Preview Background */}
<View style={styles.previewContainer}>
<View style={styles.cameraWrapper}>
{Platform.OS === 'android' && !useFrontCamera ? (
{Platform.OS === 'android' ? (
<>
<UsbCameraView
ref={usbCameraRef}
style={StyleSheet.absoluteFill}
style={
isUsbConnected
? StyleSheet.absoluteFill
: { position: 'absolute', left: -9999, width: 1, height: 1 }
}
/>
{!isUsbConnected && (
useFrontCamera ? (
<CameraView
ref={expoCameraRef}
style={[styles.cameraPreview, { position: 'absolute', opacity: 1, zIndex: 10 }]}
facing="front"
pictureSize={pictureSize === 'fallback' ? undefined : pictureSize}
onCameraReady={handleCameraReady}
/>
) : (
<View style={[StyleSheet.absoluteFill, { backgroundColor: 'black', justifyContent: 'center', alignItems: 'center', zIndex: 20 }]}>
<Text style={{ color: 'white', fontSize: 24, fontWeight: 'bold' }}>USB-Kamera nicht verbunden</Text>
<Text style={{ color: 'gray', fontSize: 16, marginTop: 15, textAlign: 'center', paddingHorizontal: 40 }}>
@@ -691,6 +704,7 @@ export default function CameraScreen({
2. Falls der Kiosk-Modus aktiv ist: Beende ihn kurz (oben rechts), stecke die Kamera neu ein und setze den Haken bei "Immer zulassen", wenn das Android-Popup erscheint.
</Text>
</View>
)
)}
</>
) : (
+20
View File
@@ -111,5 +111,25 @@ export const logger = {
isWriting = false;
processLogQueue();
}
},
warn: async (message: string, error?: any) => {
if (!isEnabled) {
console.warn(`[WARN]: ${message}`, error);
return;
}
const timestamp = new Date().toISOString();
let errorString = '';
if (error) {
if (error instanceof Error) {
errorString = `\n Name: ${error.name}\n Message: ${error.message}`;
} else {
errorString = `\n Value: ${String(error)}`;
}
}
const logLine = `[WARN] ${timestamp}: ${message}${errorString}\n`;
console.warn(logLine.trim());
return enqueueWrite(logLine);
}
};