Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.flutter_webview_plugin">
xmlns:tools="http://schemas.android.com/tools"
package="com.flutter_webview_plugin">

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<application>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:name=".FlutterWebviewFileProvider"
android:authorities="${applicationId}.flutter_webview_fileprovider"
android:exported="false"
android:grantUriPermissions="true"
tools:replace="android:authorities">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.flutter_webview_plugin;

import androidx.core.content.FileProvider;

/**
* Created by Konoha on 15/08/2020
*
* Providing a custom {@code FileProvider} prevents manifest {@code <provider>} name collisions.
*
* <p>See https://developer.android.com/guide/topics/manifest/provider-element.html for details.
*/
public class FlutterWebviewFileProvider extends FileProvider {
}
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ private Uri getOutputFilename(String intentType) {
} catch (IOException e) {
e.printStackTrace();
}
return FileProvider.getUriForFile(context, packageName + ".fileprovider", capturedFile);
return FileProvider.getUriForFile(context, packageName + ".flutter_webview_fileprovider", capturedFile);
}

private File createCapturedFile(String prefix, String suffix) throws IOException {
Expand Down