In my React Native app, I need to open a WebView redirecting to my NextJS application. Its a simple page rendering a FaceDetection component from Amazon Amplify UI. The "problem" (which I know is a safety feature) is everytime I open the webview on my phone, it asks if I allow the app to use the camera. Is there a way to "save" this setting? Allow once, and never again?
The Nextjs URL is HTTPS btw
Here is the component being rendered
const webViewProps = { ref: webViewRef, source: { uri: WEBVIEW_URL }, scrollEnabled: false, showsHorizontalScrollIndicator: false, showsVerticalScrollIndicator: false, bounces: false, onMessage: handleWebViewMessage, javaScriptEnabled: true, domStorageEnabled: true, startInLoadingState: true, scalesPageToFit: true, allowsInlineMediaPlayback: true, mediaPlaybackRequiresUserAction: false, allowsCamera: true, allowsMicrophone: true, allowsLinkPreview: false, cacheEnabled: true, incognito: false, thirdPartyCookiesEnabled: true, sharedCookiesEnabled: true, allowsLocalNetworking: true, allowsBackForwardNavigationGestures: false, userAgent: "MyApp-WebView/1.0 (iOS/Android)", onLoadStart: () => setIsLoading(true), onLoadEnd: () => setIsLoading(false), }; return <WebView {...webViewProps} style={{ flex: 1 }} />;