Compare commits
2
Commits
d4cff1ed98
...
d8c1b2f764
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8c1b2f764 | ||
|
|
4ad2c97c91 |
Binary file not shown.
Binary file not shown.
@@ -35,10 +35,12 @@ class UsbCameraView(context: Context, appContext: AppContext) : ExpoView(context
|
||||
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,
|
||||
android.content.Intent("com.schnappix.USB_PERMISSION"),
|
||||
intent,
|
||||
android.app.PendingIntent.FLAG_MUTABLE or android.app.PendingIntent.FLAG_UPDATE_CURRENT
|
||||
)
|
||||
usbManager.requestPermission(device, permissionIntent)
|
||||
|
||||
@@ -644,7 +644,7 @@ export default function CameraScreen({
|
||||
|
||||
{/* Render UI controls/overlays on top */}
|
||||
{renderContent()}
|
||||
</Animated.View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -689,6 +689,7 @@ const styles = StyleSheet.create({
|
||||
backgroundColor: 'transparent',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
zIndex: 100,
|
||||
},
|
||||
idleContentArea: {
|
||||
height: '100%',
|
||||
@@ -699,6 +700,12 @@ const styles = StyleSheet.create({
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
zIndex: 100,
|
||||
},
|
||||
settingsButton: {
|
||||
position: 'absolute',
|
||||
|
||||
Reference in New Issue
Block a user