From c99bf50310f00ebe3d20278bc49f90a166a930da Mon Sep 17 00:00:00 2001 From: "abhay.singh" Date: Fri, 8 Jul 2016 12:14:11 -0500 Subject: [PATCH 1/3] Fixed change GRANT PERMISSION button not responding once user select to never ask again checkbox and deny permission on Marshmallow and above devices --- .../activities/AlbumSelectActivity.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/multipleimageselect/src/main/java/com/darsh/multipleimageselect/activities/AlbumSelectActivity.java b/multipleimageselect/src/main/java/com/darsh/multipleimageselect/activities/AlbumSelectActivity.java index 859f3e6..684fda2 100644 --- a/multipleimageselect/src/main/java/com/darsh/multipleimageselect/activities/AlbumSelectActivity.java +++ b/multipleimageselect/src/main/java/com/darsh/multipleimageselect/activities/AlbumSelectActivity.java @@ -41,7 +41,9 @@ * Created by Darshan on 4/14/2015. */ public class AlbumSelectActivity extends AppCompatActivity { + private final String TAG = AlbumSelectActivity.class.getName(); + private static final String APP_PACKAGE_NAME_SUFFIX = "package:"; private ArrayList albums; @@ -94,7 +96,13 @@ protected void onCreate(Bundle savedInstanceState) { grantPermission.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - requestPermission(); + if(!ActivityCompat.shouldShowRequestPermissionRationale(AlbumSelectActivity.this,Manifest.permission.READ_EXTERNAL_STORAGE)){ + Intent intent = new Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS); + intent.setData(Uri.parse( APP_PACKAGE_NAME_SUFFIX + getPackageName())); + startActivity(intent); + } else { + requestPermission(); + } } }); hidePermissionHelperUI(); From 30056e02e0b5068322e521a40d4f980837f5f6c1 Mon Sep 17 00:00:00 2001 From: "abhay.singh" Date: Fri, 8 Jul 2016 12:16:45 -0500 Subject: [PATCH 2/3] Fixed change GRANT PERMISSION button not responding once user select to never ask again checkbox and deny permission on Marshmallow and above devices --- multipleimageselect/multipleimageselect.iml | 18 ++++++------- sample/sample.iml | 29 +++++++-------------- 2 files changed, 18 insertions(+), 29 deletions(-) diff --git a/multipleimageselect/multipleimageselect.iml b/multipleimageselect/multipleimageselect.iml index 758491d..5d4dbc8 100644 --- a/multipleimageselect/multipleimageselect.iml +++ b/multipleimageselect/multipleimageselect.iml @@ -62,13 +62,6 @@ - - - - - - - @@ -76,6 +69,13 @@ + + + + + + + @@ -87,9 +87,7 @@ - - @@ -98,8 +96,8 @@ - + diff --git a/sample/sample.iml b/sample/sample.iml index b7c60b6..a09c3d8 100644 --- a/sample/sample.iml +++ b/sample/sample.iml @@ -61,13 +61,6 @@ - - - - - - - @@ -75,43 +68,41 @@ + + + + + + + - - - - - - - - - - - - + + + \ No newline at end of file From 1ef59aa4dcae0200574e5977aa6544e40946e9b2 Mon Sep 17 00:00:00 2001 From: "abhay.singh" Date: Fri, 8 Jul 2016 12:27:00 -0500 Subject: [PATCH 3/3] removed iml changes --- multipleimageselect/multipleimageselect.iml | 18 +++++++------ sample/sample.iml | 29 ++++++++++++++------- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/multipleimageselect/multipleimageselect.iml b/multipleimageselect/multipleimageselect.iml index 5d4dbc8..758491d 100644 --- a/multipleimageselect/multipleimageselect.iml +++ b/multipleimageselect/multipleimageselect.iml @@ -62,13 +62,6 @@ - - - - - - - @@ -76,6 +69,13 @@ + + + + + + + @@ -87,7 +87,9 @@ + + @@ -96,8 +98,8 @@ - + diff --git a/sample/sample.iml b/sample/sample.iml index a09c3d8..b7c60b6 100644 --- a/sample/sample.iml +++ b/sample/sample.iml @@ -61,13 +61,6 @@ - - - - - - - @@ -75,34 +68,50 @@ + + + + + + + + + + + + + + + + - + + + - - \ No newline at end of file