PieterVanPoyer commented on a change in pull request #669:
URL:
https://github.com/apache/cordova-plugin-camera/pull/669#discussion_r504514583
##########
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:
Yes, this works.
- I dit test with target API 29, and 5.1 emulator. It works.
The Build.VERSION_CODES are compile-time constants that gets inlined in the
generated bytecode. Because of that, the symbol does not need to be resolved at
runtime.
Some additional context:
- I did also make the decision to use smaller or equal to
Build.VERSION_CODES.P instead of smaller than Build.VERSION_CODES.Q . Because
When you downscale the compile version to 28, it keeps compiling and working.
- But you cannot compile with version 27. Becuase VERSION_CODES.P is not
available in that sdk.

----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]