From c2f6c316ebfa3d6c7964fcc9961abc46574a55de Mon Sep 17 00:00:00 2001 From: czu Date: Fri, 24 Sep 2021 17:53:50 +0200 Subject: [PATCH 1/9] hotfix --- src/ios/SOSPicker.m | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ios/SOSPicker.m b/src/ios/SOSPicker.m index 0e2e00e7..1a35ac70 100644 --- a/src/ios/SOSPicker.m +++ b/src/ios/SOSPicker.m @@ -101,6 +101,7 @@ - (void)launchGMImagePicker:(bool)allow_video title:(NSString *)title message:(N UIPopoverPresentationController *popPC = picker.popoverPresentationController; popPC.permittedArrowDirections = UIPopoverArrowDirectionAny; popPC.sourceView = picker.view; + popPC.sourceRect = CGRectMake(0, 0, 0, 0); //popPC.sourceRect = nil; } From 38255b0138c9be6e36c0595c273981268299d969 Mon Sep 17 00:00:00 2001 From: czu Date: Fri, 24 Sep 2021 18:43:31 +0200 Subject: [PATCH 2/9] fix --- plugin.xml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/plugin.xml b/plugin.xml index e9d0e62c..bc84adae 100644 --- a/plugin.xml +++ b/plugin.xml @@ -36,9 +36,6 @@ - - - @@ -100,7 +97,6 @@ - @@ -158,10 +154,10 @@ - - - - + + + + @@ -169,8 +165,8 @@ - - - + + + From fa0dc90dd5802035903c6a4c1a5880c4b4bde458 Mon Sep 17 00:00:00 2001 From: czu Date: Mon, 27 Sep 2021 12:39:20 +0200 Subject: [PATCH 3/9] missing dependency ios --- plugin.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin.xml b/plugin.xml index bc84adae..3853b808 100644 --- a/plugin.xml +++ b/plugin.xml @@ -36,6 +36,9 @@ + + + From 9ea2844bca487f39d24fee2f4b9a90786aa89d2c Mon Sep 17 00:00:00 2001 From: Gerald Peoples Date: Fri, 13 Jan 2023 09:49:07 +0000 Subject: [PATCH 4/9] Bugfix: #257 --- plugin.xml | 6 ++++-- src/android/Library/res/values/themes.xml | 5 ----- 2 files changed, 4 insertions(+), 7 deletions(-) delete mode 100644 src/android/Library/res/values/themes.xml diff --git a/plugin.xml b/plugin.xml index e9d0e62c..7f922902 100644 --- a/plugin.xml +++ b/plugin.xml @@ -139,8 +139,10 @@ - - + + + diff --git a/src/android/Library/res/values/themes.xml b/src/android/Library/res/values/themes.xml deleted file mode 100644 index 2ec73cf1..00000000 --- a/src/android/Library/res/values/themes.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file From 1275be6a07edd5e772a9d2b7858d247428eec3ba Mon Sep 17 00:00:00 2001 From: VerianMobile Date: Wed, 9 Aug 2023 13:30:28 +0530 Subject: [PATCH 5/9] Fix permission issue Android 13 - add new permission READ_MEDIA_IMAGES in place of READ_EXTERNAL_STORAGE in android 13 --- README.md | 8 ++++---- .../com/synconset/ImagePicker/ImagePicker.java | 18 +++++++++++++----- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 9612d299..3fd573c5 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,13 @@ The plugin conforms to the Cordova plugin specification, it can be installed using the Cordova / Phonegap command line interface. # without desc - phonegap plugin add https://github.com/Telerik-Verified-Plugins/ImagePicker.git - cordova plugin add https://github.com/Telerik-Verified-Plugins/ImagePicker.git + phonegap plugin add https://github.com/VerianMobile/ImagePicker.git + cordova plugin add https://github.com/VerianMobile/ImagePicker.git # with desc - phonegap plugin add https://github.com/Telerik-Verified-Plugins/ImagePicker.git --variable PHOTO_LIBRARY_USAGE_DESCRIPTION="your usage message" + phonegap plugin add https://github.com/VerianMobile/ImagePicker.git --variable PHOTO_LIBRARY_USAGE_DESCRIPTION="your usage message" - cordova plugin add https://github.com/Telerik-Verified-Plugins/ImagePicker.git --variable PHOTO_LIBRARY_USAGE_DESCRIPTION="your usage message" + cordova plugin add https://github.com/VerianMobile/ImagePicker.git --variable PHOTO_LIBRARY_USAGE_DESCRIPTION="your usage message" ## Using the plugin diff --git a/src/android/com/synconset/ImagePicker/ImagePicker.java b/src/android/com/synconset/ImagePicker/ImagePicker.java index b534736a..c67cc778 100644 --- a/src/android/com/synconset/ImagePicker/ImagePicker.java +++ b/src/android/com/synconset/ImagePicker/ImagePicker.java @@ -20,8 +20,8 @@ import android.content.pm.PackageManager; import android.os.Build; import android.os.Bundle; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; public class ImagePicker extends CordovaPlugin { @@ -32,6 +32,7 @@ public class ImagePicker extends CordovaPlugin { private static final int PERMISSION_REQUEST_CODE = 100; private CallbackContext callbackContext; + public boolean execute(String action, final JSONArray args, final CallbackContext callbackContext) throws JSONException { this.callbackContext = callbackContext; @@ -104,16 +105,23 @@ public boolean execute(String action, final JSONArray args, final CallbackContex @SuppressLint("InlinedApi") private boolean hasReadPermission() { - return Build.VERSION.SDK_INT < 23 || - PackageManager.PERMISSION_GRANTED == ContextCompat.checkSelfPermission(this.cordova.getActivity(), Manifest.permission.READ_EXTERNAL_STORAGE); + String readImagePermission = Manifest.permission.READ_EXTERNAL_STORAGE; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + readImagePermission = Manifest.permission.READ_MEDIA_IMAGES; + } + return PackageManager.PERMISSION_GRANTED == ContextCompat.checkSelfPermission(this.cordova.getActivity(), readImagePermission); } @SuppressLint("InlinedApi") private void requestReadPermission() { + String readImagePermission = Manifest.permission.READ_EXTERNAL_STORAGE; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + readImagePermission = Manifest.permission.READ_MEDIA_IMAGES; + } if (!hasReadPermission()) { ActivityCompat.requestPermissions( this.cordova.getActivity(), - new String[] {Manifest.permission.READ_EXTERNAL_STORAGE}, + new String[] { readImagePermission }, PERMISSION_REQUEST_CODE); } // This method executes async and we seem to have no known way to receive the result From 42bb3e3e866bdece435766a6042fb42220a4dc70 Mon Sep 17 00:00:00 2001 From: VerianMobile Date: Wed, 9 Aug 2023 15:26:24 +0530 Subject: [PATCH 6/9] Fix permission issue Android 13 - add new permission READ_MEDIA_IMAGES in place of READ_EXTERNAL_STORAGE in android 13 --- plugin.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 7f922902..5d72cdd2 100644 --- a/plugin.xml +++ b/plugin.xml @@ -106,8 +106,10 @@ - + + + From abee9f94e747766bac0c58a2ceccaae2f8d4ff82 Mon Sep 17 00:00:00 2001 From: VerianMobile Date: Mon, 28 Aug 2023 13:19:06 +0530 Subject: [PATCH 7/9] Add androidx to multi-image chooser Add androidx to multi-image chooser --- plugin.xml | 1 - src/android/Library/src/MultiImageChooserActivity.java | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/plugin.xml b/plugin.xml index 5d72cdd2..1d13a15c 100644 --- a/plugin.xml +++ b/plugin.xml @@ -109,7 +109,6 @@ - diff --git a/src/android/Library/src/MultiImageChooserActivity.java b/src/android/Library/src/MultiImageChooserActivity.java index ba379e3b..6c9c78b5 100644 --- a/src/android/Library/src/MultiImageChooserActivity.java +++ b/src/android/Library/src/MultiImageChooserActivity.java @@ -62,8 +62,8 @@ import android.os.AsyncTask; import android.os.Bundle; import android.provider.MediaStore; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.app.ActionBar; import android.util.Base64; import android.util.SparseBooleanArray; import android.view.Display; From 69a234d4ba6d532043e9dae0f1c53bb0694ccb5e Mon Sep 17 00:00:00 2001 From: Cristian Zumelzu Date: Tue, 5 Sep 2023 18:01:37 +0200 Subject: [PATCH 8/9] removed theme --- plugin.xml | 2 +- src/android/Library/res/values/themes.xml | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 src/android/Library/res/values/themes.xml diff --git a/plugin.xml b/plugin.xml index 3853b808..532c2b47 100644 --- a/plugin.xml +++ b/plugin.xml @@ -138,7 +138,7 @@ - + diff --git a/src/android/Library/res/values/themes.xml b/src/android/Library/res/values/themes.xml deleted file mode 100644 index 2ec73cf1..00000000 --- a/src/android/Library/res/values/themes.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file From 1a0752bcc43a265da6f91a13f1e47186f006a7cc Mon Sep 17 00:00:00 2001 From: Cristian Zumelzu Date: Thu, 7 Sep 2023 11:07:29 +0200 Subject: [PATCH 9/9] added themes back --- src/android/Library/res/values/themes.xml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/android/Library/res/values/themes.xml diff --git a/src/android/Library/res/values/themes.xml b/src/android/Library/res/values/themes.xml new file mode 100644 index 00000000..2ec73cf1 --- /dev/null +++ b/src/android/Library/res/values/themes.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file