You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/10/14 02:58:02 UTC

[GitHub] [cordova-plugin-camera] breautek commented on a change in pull request #669: Bugfix issue 341 save to photo gallery - Fixes #341, fixes #577

breautek commented on a change in pull request #669:
URL: https://github.com/apache/cordova-plugin-camera/pull/669#discussion_r504370675



##########
File path: src/android/CameraLauncher.java
##########
@@ -494,16 +494,18 @@ private void processResultFromCamera(int destType, Intent intent) throws IOExcep
         // in the gallery and the modified image is saved in the temporary
         // directory
         if (this.saveToPhotoAlbum) {
-            galleryUri = Uri.fromFile(new File(getPicturesPath()));
+            GalleryPathVO galleryPathVO = getPicturesPath();
+            galleryUri = Uri.fromFile(new File(galleryPathVO.getGalleryPath()));
 
             if (this.allowEdit && this.croppedUri != null) {
                 writeUncompressedImage(croppedUri, galleryUri);
             } else {
-                Uri imageUri = this.imageUri;
-                writeUncompressedImage(imageUri, galleryUri);
+                if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.P) { // Between LOLLIPOP_MR1 and P

Review comment:
       I kinda forget android behaviour, can we double check that `Build.VERSION_CODES.P` is safe to use on devices that are API  < 28?
   
   Ie: Android 5.1 simulator, with an app built with target API 29.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org