From 73b7728c62af328c9d80f9457a5c75318e3dbd1a Mon Sep 17 00:00:00 2001 From: EyreFree Date: Wed, 3 Apr 2019 19:41:17 +0800 Subject: [PATCH] Fix --- README.md | 8 +++----- .../src/main/java/com/ly/permission/PermissionPlugin.java | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c199884..48db2f9 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ enum PermissionName { } ``` -####Android: +### Android Only dangerous permissions require user agreement. @@ -155,7 +155,7 @@ Make sure you add the needed permissions to your Android Manifest Permission. ``` -#### iOS +### iOS Add the needed permissions to your info.plist @@ -178,7 +178,7 @@ Make sure you add the needed permissions to your Android Manifest Permission. Your prompt ``` -#### Methods +### Methods ```dart import 'package:permission/permission.dart'; @@ -196,5 +196,3 @@ PermissionStatus permissionStatus = await Permission.requestSinglePermission(Per # Both Permission.openSettings; ``` - -#### \ No newline at end of file diff --git a/android/src/main/java/com/ly/permission/PermissionPlugin.java b/android/src/main/java/com/ly/permission/PermissionPlugin.java index 0ca7e46..ccf2072 100644 --- a/android/src/main/java/com/ly/permission/PermissionPlugin.java +++ b/android/src/main/java/com/ly/permission/PermissionPlugin.java @@ -122,7 +122,7 @@ private String getManifestPermission(String permission) { result = Manifest.permission.READ_SMS; break; case "Storage": - result = Manifest.permission.READ_EXTERNAL_STORAGE; + result = Manifest.permission.WRITE_EXTERNAL_STORAGE; break; default: result = "ERROR";