Initialize Schnappix Photo Booth application with custom UVC camera, silent Wi-Fi IPP printing, local gallery storage, and kiosk screen pinning support
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
const { withAndroidManifest } = require('@expo/config-plugins');
|
||||
|
||||
const withUsbCamera = (config) => {
|
||||
return withAndroidManifest(config, async (config) => {
|
||||
const androidManifest = config.modResults;
|
||||
|
||||
if (!androidManifest.manifest['uses-feature']) {
|
||||
androidManifest.manifest['uses-feature'] = [];
|
||||
}
|
||||
|
||||
// Check if usb.host feature is already added
|
||||
const featureExists = androidManifest.manifest['uses-feature'].some(
|
||||
(f) => f.$['android:name'] === 'android.hardware.usb.host'
|
||||
);
|
||||
|
||||
if (!featureExists) {
|
||||
androidManifest.manifest['uses-feature'].push({
|
||||
$: {
|
||||
'android:name': 'android.hardware.usb.host',
|
||||
'android:required': 'false',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return config;
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = withUsbCamera;
|
||||
Reference in New Issue
Block a user