1

I'm trying to use react-native-webview to load the website which can take picture or upload photo from the device. My settings are as below and I can take a picture directly but it is not clear so I'm trying to upload photo from the device but the app crashes whenever I select upload files. It shows options (camera, file) when I click on upload file option but as soon as I try to go back or take a picture, the app crashes. Is there a way to solve this?

mediaPlaybackRequiresUserAction={false}
startInLoadingState={true}
allowsInlineMediaPlayback={true}
allowFileAccess={true}
allowUniversalAccessFromFileURLs={true}
useWebKit
javaScriptEnabled
source={{ uri: 'uri' }}
originWhitelist={['*']}

1 Answer 1

1

try adding this permission to your AndroidManifest.xml

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.