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) {
|
for (device in devices) {
|
||||||
android.util.Log.e("UsbCameraView", "Checking device: ${device.deviceName}, class: ${device.deviceClass}, interfaces: ${device.interfaceCount}")
|
android.util.Log.e("UsbCameraView", "Checking device: ${device.deviceName}, class: ${device.deviceClass}, interfaces: ${device.interfaceCount}")
|
||||||
if (!usbManager.hasPermission(device)) {
|
if (!usbManager.hasPermission(device)) {
|
||||||
|
val intent = android.content.Intent("com.schnappix.USB_PERMISSION")
|
||||||
|
intent.setPackage(context.packageName)
|
||||||
val permissionIntent = android.app.PendingIntent.getBroadcast(
|
val permissionIntent = android.app.PendingIntent.getBroadcast(
|
||||||
activityContext,
|
activityContext,
|
||||||
0,
|
0,
|
||||||
android.content.Intent("com.schnappix.USB_PERMISSION"),
|
intent,
|
||||||
android.app.PendingIntent.FLAG_MUTABLE or android.app.PendingIntent.FLAG_UPDATE_CURRENT
|
android.app.PendingIntent.FLAG_MUTABLE or android.app.PendingIntent.FLAG_UPDATE_CURRENT
|
||||||
)
|
)
|
||||||
usbManager.requestPermission(device, permissionIntent)
|
usbManager.requestPermission(device, permissionIntent)
|
||||||
|
|||||||
@@ -644,7 +644,7 @@ export default function CameraScreen({
|
|||||||
|
|
||||||
{/* Render UI controls/overlays on top */}
|
{/* Render UI controls/overlays on top */}
|
||||||
{renderContent()}
|
{renderContent()}
|
||||||
</Animated.View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -689,6 +689,7 @@ const styles = StyleSheet.create({
|
|||||||
backgroundColor: 'transparent',
|
backgroundColor: 'transparent',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
zIndex: 100,
|
||||||
},
|
},
|
||||||
idleContentArea: {
|
idleContentArea: {
|
||||||
height: '100%',
|
height: '100%',
|
||||||
@@ -699,6 +700,12 @@ const styles = StyleSheet.create({
|
|||||||
flex: 1,
|
flex: 1,
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
position: 'absolute',
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: 0,
|
||||||
|
zIndex: 100,
|
||||||
},
|
},
|
||||||
settingsButton: {
|
settingsButton: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
|
|||||||
Reference in New Issue
Block a user