You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by jc...@apache.org on 2018/09/21 23:21:14 UTC
[cordova-plugin-media-capture] branch master updated: CB-14260:
(android) captureImage permission denial on android 8.1 (#95)
This is an automated email from the ASF dual-hosted git repository.
jcesarmobile pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-media-capture.git
The following commit(s) were added to refs/heads/master by this push:
new 3755f9f CB-14260: (android) captureImage permission denial on android 8.1 (#95)
3755f9f is described below
commit 3755f9f7374cb6434ddbf67e8c5e800671b939f5
Author: Marco Celotti <m....@gmail.com>
AuthorDate: Sat Sep 22 01:21:09 2018 +0200
CB-14260: (android) captureImage permission denial on android 8.1 (#95)
* CB-14260: (android) captureImage permission denial on android 8.1
---
src/android/Capture.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/android/Capture.java b/src/android/Capture.java
index 40117aa..24578bc 100644
--- a/src/android/Capture.java
+++ b/src/android/Capture.java
@@ -251,16 +251,16 @@ public class Capture extends CordovaPlugin {
*/
private void captureImage(Request req) {
boolean needExternalStoragePermission =
- !PermissionHelper.hasPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE);
+ !PermissionHelper.hasPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);
boolean needCameraPermission = cameraPermissionInManifest &&
!PermissionHelper.hasPermission(this, Manifest.permission.CAMERA);
if (needExternalStoragePermission || needCameraPermission) {
if (needExternalStoragePermission && needCameraPermission) {
- PermissionHelper.requestPermissions(this, req.requestCode, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.CAMERA});
+ PermissionHelper.requestPermissions(this, req.requestCode, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.CAMERA});
} else if (needExternalStoragePermission) {
- PermissionHelper.requestPermission(this, req.requestCode, Manifest.permission.READ_EXTERNAL_STORAGE);
+ PermissionHelper.requestPermission(this, req.requestCode, Manifest.permission.WRITE_EXTERNAL_STORAGE);
} else {
PermissionHelper.requestPermission(this, req.requestCode, Manifest.permission.CAMERA);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org