Auto-Commit: 2026-08-19 08:51:17
This commit is contained in:
1 parent
057af14f90
commit
f84f3c1e71
10 files changed
+112
-99
No files matched your search
@@ -66,3 +66,5 @@
|
||||
7 49 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/CMakeFiles/cmake.verify_globs 5250f1b80cb55465
|
||||
4 58 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/CMakeFiles/cmake.verify_globs 5250f1b80cb55465
|
||||
3 37 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/CMakeFiles/cmake.verify_globs 5250f1b80cb55465
|
||||
6 44 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/arm64-v8a/CMakeFiles/cmake.verify_globs 5250f1b80cb55465
|
||||
5 43 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
|
||||
@@ -66,3 +66,5 @@
|
||||
5 32 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/CMakeFiles/cmake.verify_globs 1eb2d1da6ebc2e74
|
||||
3 71 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/CMakeFiles/cmake.verify_globs 1eb2d1da6ebc2e74
|
||||
4 42 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/CMakeFiles/cmake.verify_globs 1eb2d1da6ebc2e74
|
||||
4 42 0 C:/GitHub/Schnappix/android/app/.cxx/RelWithDebInfo/3x5j4n2e/armeabi-v7a/CMakeFiles/cmake.verify_globs 1eb2d1da6ebc2e74
|
||||
3 48 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
|
||||
@@ -92,8 +92,8 @@ android {
|
||||
applicationId 'de.orfel.schnappix'
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 32
|
||||
versionName "23.01.32"
|
||||
versionCode 33
|
||||
versionName "23.01.33"
|
||||
|
||||
buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\""
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -3,7 +3,7 @@
|
||||
"newArchEnabled": true,
|
||||
"name": "Schnappix",
|
||||
"slug": "Schnappix",
|
||||
"version": "23.01.32",
|
||||
"version": "23.01.33",
|
||||
"orientation": "landscape",
|
||||
"icon": "./Icon.png",
|
||||
"userInterfaceStyle": "dark",
|
||||
@@ -13,7 +13,7 @@
|
||||
},
|
||||
"android": {
|
||||
"package": "de.orfel.schnappix",
|
||||
"versionCode": 32,
|
||||
"versionCode": 33,
|
||||
"usesCleartextTraffic": true,
|
||||
"adaptiveIcon": {
|
||||
"backgroundColor": "#050510",
|
||||
|
||||
@@ -28,69 +28,75 @@ class UsbCameraView(context: Context, appContext: AppContext) : ExpoView(context
|
||||
textureView = AspectRatioTextureView(context)
|
||||
addView(textureView, LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT))
|
||||
|
||||
val cameraRequest = CameraRequest.Builder()
|
||||
.setFrontCamera(false)
|
||||
.create()
|
||||
|
||||
val activityContext = appContext.currentActivity ?: context
|
||||
|
||||
// Explicitly request permission for any connected USB camera before starting ausbc
|
||||
try {
|
||||
val usbManager = context.getSystemService(Context.USB_SERVICE) as android.hardware.usb.UsbManager
|
||||
val devices = usbManager.deviceList.values
|
||||
android.util.Log.e("UsbCameraView", "Found ${devices.size} USB devices connected")
|
||||
for (device in devices) {
|
||||
android.util.Log.e("UsbCameraView", "Checking device: ${device.deviceName}, class: ${device.deviceClass}, interfaces: ${device.interfaceCount}")
|
||||
if (!usbManager.hasPermission(device)) {
|
||||
val intent = android.content.Intent("com.schnappix.USB_PERMISSION")
|
||||
intent.setPackage(context.packageName)
|
||||
val permissionIntent = android.app.PendingIntent.getBroadcast(
|
||||
activityContext,
|
||||
0,
|
||||
intent,
|
||||
android.app.PendingIntent.FLAG_MUTABLE or android.app.PendingIntent.FLAG_UPDATE_CURRENT
|
||||
)
|
||||
usbManager.requestPermission(device, permissionIntent)
|
||||
android.util.Log.e("UsbCameraView", "Requested USB permission manually for ${device.deviceName}")
|
||||
} else {
|
||||
android.util.Log.e("UsbCameraView", "Already has USB permission for ${device.deviceName}")
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
val cameraRequest = CameraRequest.Builder()
|
||||
.setFrontCamera(false)
|
||||
.create()
|
||||
|
||||
val permissionReceiver = object : android.content.BroadcastReceiver() {
|
||||
override fun onReceive(context: Context, intent: android.content.Intent) {
|
||||
if ("com.schnappix.USB_PERMISSION" == intent.action) {
|
||||
synchronized(this) {
|
||||
val granted = intent.getBooleanExtra(android.hardware.usb.UsbManager.EXTRA_PERMISSION_GRANTED, false)
|
||||
if (granted) {
|
||||
android.util.Log.e("UsbCameraView", "Permission granted from Broadcast!")
|
||||
startPreview()
|
||||
} else {
|
||||
android.util.Log.e("UsbCameraView", "Permission denied from Broadcast!")
|
||||
val activityContext = appContext.currentActivity ?: context
|
||||
|
||||
// Explicitly request permission for any connected USB camera before starting ausbc
|
||||
try {
|
||||
val usbManager = context.getSystemService(Context.USB_SERVICE) as android.hardware.usb.UsbManager
|
||||
val devices = usbManager.deviceList.values
|
||||
android.util.Log.e("UsbCameraView", "Found ${devices.size} USB devices connected")
|
||||
for (device in devices) {
|
||||
android.util.Log.e("UsbCameraView", "Checking device: ${device.deviceName}, class: ${device.deviceClass}, interfaces: ${device.interfaceCount}")
|
||||
if (!usbManager.hasPermission(device)) {
|
||||
val intent = android.content.Intent("com.schnappix.USB_PERMISSION")
|
||||
intent.setPackage(context.packageName)
|
||||
val permissionIntent = android.app.PendingIntent.getBroadcast(
|
||||
activityContext,
|
||||
0,
|
||||
intent,
|
||||
android.app.PendingIntent.FLAG_MUTABLE or android.app.PendingIntent.FLAG_UPDATE_CURRENT
|
||||
)
|
||||
usbManager.requestPermission(device, permissionIntent)
|
||||
android.util.Log.e("UsbCameraView", "Requested USB permission manually for ${device.deviceName}")
|
||||
} else {
|
||||
android.util.Log.e("UsbCameraView", "Already has USB permission for ${device.deviceName}")
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
android.util.Log.e("UsbCameraView", "Error checking USB devices: ${e.message}", e)
|
||||
}
|
||||
|
||||
val permissionReceiver = object : android.content.BroadcastReceiver() {
|
||||
override fun onReceive(context: Context, intent: android.content.Intent) {
|
||||
if ("com.schnappix.USB_PERMISSION" == intent.action) {
|
||||
synchronized(this) {
|
||||
val granted = intent.getBooleanExtra(android.hardware.usb.UsbManager.EXTRA_PERMISSION_GRANTED, false)
|
||||
if (granted) {
|
||||
android.util.Log.e("UsbCameraView", "Permission granted from Broadcast!")
|
||||
startPreview()
|
||||
} else {
|
||||
android.util.Log.e("UsbCameraView", "Permission denied from Broadcast!")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val filter = android.content.IntentFilter("com.schnappix.USB_PERMISSION")
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.TIRAMISU) {
|
||||
activityContext.registerReceiver(permissionReceiver, filter, Context.RECEIVER_EXPORTED)
|
||||
} else {
|
||||
activityContext.registerReceiver(permissionReceiver, filter)
|
||||
}
|
||||
|
||||
cameraClient = CameraClient.newBuilder(activityContext)
|
||||
.setCameraStrategy(CameraUvcStrategy(activityContext))
|
||||
.setCameraRequest(cameraRequest)
|
||||
.setEnableGLES(false)
|
||||
.build()
|
||||
|
||||
post {
|
||||
startPreview()
|
||||
val filter = android.content.IntentFilter("com.schnappix.USB_PERMISSION")
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.TIRAMISU) {
|
||||
activityContext.registerReceiver(permissionReceiver, filter, Context.RECEIVER_EXPORTED)
|
||||
} else {
|
||||
activityContext.registerReceiver(permissionReceiver, filter)
|
||||
}
|
||||
|
||||
cameraClient = CameraClient.newBuilder(activityContext)
|
||||
.setCameraStrategy(CameraUvcStrategy(activityContext))
|
||||
.setCameraRequest(cameraRequest)
|
||||
.setEnableGLES(false)
|
||||
.build()
|
||||
|
||||
post {
|
||||
startPreview()
|
||||
}
|
||||
} catch (e: Throwable) {
|
||||
android.util.Log.e("UsbCameraView", "CRASH IN INIT: ${e.message}", e)
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "schnappix",
|
||||
"version": "23.01.32",
|
||||
"version": "23.01.33",
|
||||
"main": "index.ts",
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
||||
|
||||
Reference in new issue
Block a user