breautek commented on a change in pull request #669:
URL:
https://github.com/apache/cordova-plugin-camera/pull/669#discussion_r504632953
##########
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:
Ok, even though this normally would be the acceptable approach because
Google Play enforces apps to be built with target SDK 28, (and soon to be
forced for all apps to use API target 29)
Cordova is suppose to support enterprise environments where the play store
is not involved in their process, and therefore they may use a lower target SDK
than what Google demands. This means we can't actually use the `VERSION_CODES`
constants unless if they are introduced in/before our min sdk level. So I guess
for now the solution to this is to change `Build.VERSION_CODES.P` to a
hard-code numerical `28`.
This isn't documented in the Cordova docs, I'm requesting the actual minimum
target API we support to be defined so that this can actually be documented.
----------------------------------------------------------------
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]