I am using react native webview to rend web content in react native app.bus as soon as i try to upload file from the webview it opens the file manges and on slection of file app gets crashed
i have granted the read and write external storage.
error in android studio
E/WebEngage: App has crashed
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/document:19 flg=0x1 }} to activity {com.xyz.user.debug/com.xyz.user.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference
<WebView
androidLayerType={'hardware'}
source={{uri: "https://imgbb.com/#google_vignette"}}
renderLoading={() => <AnimatedLoader isFullPageLoader={true}/>}
startInLoadingState={true}
style={{
marginTop: 0,
marginHorizontal: 0,
backgroundColor: 'white',
flex:1
}}
onNavigationStateChange={(e) => onNavigationStateChange(e)}
onRenderProcessGone={syntheticEvent => {
const { nativeEvent } = syntheticEvent;
console.log(
'WebView Crashed: ',
nativeEvent.didCrash,
);
}}
domStorageEnabled={true}
allowFileAccessFromFileURLs={true}
allowUniversalAccessFromFileURLs={true}
allowFileAccess={true}
mediaCapturePermissionGrantType={"prompt"}
androidHardwareAccelerationDisabled={true}
/>
I have taken storage permission
New contributor
Ajay Malde Chawada is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.