I'm using flutter_inappwebview package because after some research I found that it's the only webview package that supports the features the I need, one of them is uploading a file to a certain website, I tried the example app flutter_inappwebview example and everything worked perfectly except when I try to select an image or a file from a website, it suddenly crashes and closes the app, so how can I fix this
Problem solved by using this configuration
STEP 1 Configure Android On Android, you need to add these permissions in your AndroidManifest.xml file to be able to use camera for taking images and videos:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.VIDEO_CAPTURE" />
<uses-permission android:name="android.permission.AUDIO_CAPTURE" />
STEP 2
Also, you need to add the following code inside the tag of your AndroidManifest file:
<provider
android:name="com.pichillilorenzo.flutter_inappwebview.InAppWebViewFileProvider"
android:authorities="${applicationId}.flutter_inappwebview.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With