diff --git a/README.md b/README.md index 050c865..5cd6b66 100644 --- a/README.md +++ b/README.md @@ -93,4 +93,7 @@ PhotoViewer.show('http://my_site.com/my_image.jpg', 'Optional Title', options); (1.1.21) - Fix Typo in PhotoViewer.js -- Fix Typo in PhotoActivity.java \ No newline at end of file +- Fix Typo in PhotoActivity.java + +(1.1.22) +- Ask always for permissions on Android. \ No newline at end of file diff --git a/package.json b/package.json index ee8f34e..bde07de 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com-sarriaroman-photoviewer", - "version": "1.1.21", + "version": "1.1.22", "description": "This plugin is intended to show a picture from an URL into a Photo Viewer with zoom features.", "cordova": { "id": "com-sarriaroman-photoviewer", diff --git a/plugin.xml b/plugin.xml index ab4e08b..94e12a4 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,5 +1,5 @@ - + PhotoViewer This plugin is intended to show a picture from an URL into a Photo Viewer with zoom features. diff --git a/src/android/PhotoViewer.java b/src/android/PhotoViewer.java index 9f7359a..41c333e 100644 --- a/src/android/PhotoViewer.java +++ b/src/android/PhotoViewer.java @@ -34,13 +34,7 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo this.args = args; this.callbackContext = callbackContext; - boolean requiresExternalPermission = true; - try { - requiresExternalPermission = this.args.getBoolean(2); - } catch (JSONException exception) { - } - - if (!requiresExternalPermission || (cordova.hasPermission(READ) && cordova.hasPermission(WRITE))) { + if (cordova.hasPermission(READ) && cordova.hasPermission(WRITE)) { this.launchActivity(); } else { this.getPermission();