From 140e8861e30164da0861fec548d0aa2413197e12 Mon Sep 17 00:00:00 2001 From: Norman Breau Date: Wed, 30 Sep 2020 22:07:19 -0300 Subject: [PATCH 1/9] fix(android): Declare CAMERA permission --- plugin.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin.xml b/plugin.xml index 5b7ab1d..704744d 100644 --- a/plugin.xml +++ b/plugin.xml @@ -56,6 +56,7 @@ + Date: Wed, 7 Oct 2020 15:48:47 +0200 Subject: [PATCH 2/9] chore: Fix JIRA links in RELEASENOTES.md (#672) --- RELEASENOTES.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index af4485f..40ce358 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -62,23 +62,23 @@ - fix(ios): fixes UIImagePickerController cancel handling for iOS11+ ([#377](https://github.com/apache/cordova-plugin-camera/issues/377)) ([`24c8b6c`](https://github.com/apache/cordova-plugin-camera/commit/24c8b6c)) - docs: Remove deprecated platforms from docs ([#394](https://github.com/apache/cordova-plugin-camera/issues/394)) ([`7ddb3df`](https://github.com/apache/cordova-plugin-camera/commit/7ddb3df)) - fix(android): return DATA_URL for ALLMEDIA if it's an image ([#382](https://github.com/apache/cordova-plugin-camera/issues/382)) ([`60e7795`](https://github.com/apache/cordova-plugin-camera/commit/60e7795)) -- refactor(ios): [CB-13813](https://issues.apache.org/jira/browse/13813): Remove old iOS code ([#381](https://github.com/apache/cordova-plugin-camera/issues/381)) ([`ce77aab`](https://github.com/apache/cordova-plugin-camera/commit/ce77aab)) -- feat(ios): [CB-13865](https://issues.apache.org/jira/browse/13865): (Ipad) Making popover Window Size configurable using popoverOptions - imagePicker ([#314](https://github.com/apache/cordova-plugin-camera/issues/314)) ([`cd72047`](https://github.com/apache/cordova-plugin-camera/commit/cd72047)) -- chore(types): [CB-13837](https://issues.apache.org/jira/browse/13837): fix TypeScript Definition for CameraPopoverOptions ([#379](https://github.com/apache/cordova-plugin-camera/issues/379)) ([`86b0bf2`](https://github.com/apache/cordova-plugin-camera/commit/86b0bf2)) +- refactor(ios): [CB-13813](https://issues.apache.org/jira/browse/CB-13813): Remove old iOS code ([#381](https://github.com/apache/cordova-plugin-camera/issues/381)) ([`ce77aab`](https://github.com/apache/cordova-plugin-camera/commit/ce77aab)) +- feat(ios): [CB-13865](https://issues.apache.org/jira/browse/CB-13865): (Ipad) Making popover Window Size configurable using popoverOptions - imagePicker ([#314](https://github.com/apache/cordova-plugin-camera/issues/314)) ([`cd72047`](https://github.com/apache/cordova-plugin-camera/commit/cd72047)) +- chore(types): [CB-13837](https://issues.apache.org/jira/browse/CB-13837): fix TypeScript Definition for CameraPopoverOptions ([#379](https://github.com/apache/cordova-plugin-camera/issues/379)) ([`86b0bf2`](https://github.com/apache/cordova-plugin-camera/commit/86b0bf2)) - docs(android): clarify android quirk of cameraDirection ([`a5a3d88`](https://github.com/apache/cordova-plugin-camera/commit/a5a3d88), [`bfbe4a1`](https://github.com/apache/cordova-plugin-camera/commit/bfbe4a1)) - chore(release): Bump minor version ([#370](https://github.com/apache/cordova-plugin-camera/issues/370)) ([`eed4433`](https://github.com/apache/cordova-plugin-camera/commit/eed4433)) - build: Remove automatic README generation ([#365](https://github.com/apache/cordova-plugin-camera/issues/365)) ([`07e8574`](https://github.com/apache/cordova-plugin-camera/commit/07e8574)) - docs: remove JIRA link ([`bcb26fb`](https://github.com/apache/cordova-plugin-camera/commit/bcb26fb)) - ci(travis): also accept terms for android sdk `android-27` ([`a346212`](https://github.com/apache/cordova-plugin-camera/commit/a346212)) - docs: remove outdated docs translations that haven't been touched for 3 years ([`403682b`](https://github.com/apache/cordova-plugin-camera/commit/403682b)) -- fix(android): [CB-14097](https://issues.apache.org/jira/browse/14097): Fix crash when selecting some files with getPicture ([#322](https://github.com/apache/cordova-plugin-camera/issues/322)) ([`5c23b65`](https://github.com/apache/cordova-plugin-camera/commit/5c23b65)) -- fix(browser): [CB-13384](https://issues.apache.org/jira/browse/13384): Added deprecation of video.src compatibility ([#288](https://github.com/apache/cordova-plugin-camera/issues/288)) ([`5163d38`](https://github.com/apache/cordova-plugin-camera/commit/5163d38)) +- fix(android): [CB-14097](https://issues.apache.org/jira/browse/CB-14097): Fix crash when selecting some files with getPicture ([#322](https://github.com/apache/cordova-plugin-camera/issues/322)) ([`5c23b65`](https://github.com/apache/cordova-plugin-camera/commit/5c23b65)) +- fix(browser): [CB-13384](https://issues.apache.org/jira/browse/CB-13384): Added deprecation of video.src compatibility ([#288](https://github.com/apache/cordova-plugin-camera/issues/288)) ([`5163d38`](https://github.com/apache/cordova-plugin-camera/commit/5163d38)) - fix(browser): Remove audio flag from getUserMedia ([#284](https://github.com/apache/cordova-plugin-camera/issues/284)) ([`36343a8`](https://github.com/apache/cordova-plugin-camera/commit/36343a8)) - docs: replace warning emoji with warning unicode ([#317](https://github.com/apache/cordova-plugin-camera/issues/317)) ([`ead7d5e`](https://github.com/apache/cordova-plugin-camera/commit/ead7d5e)) - feat(android): Update engines to use variables ([#323](https://github.com/apache/cordova-plugin-camera/issues/323)) ([`6899c5e`](https://github.com/apache/cordova-plugin-camera/commit/6899c5e)) -- feat(android): [CB-14017](https://issues.apache.org/jira/browse/14017): Make com.android.support:support-v4 version configurable ([#318](https://github.com/apache/cordova-plugin-camera/issues/318)) ([`e334656`](https://github.com/apache/cordova-plugin-camera/commit/e334656)) -- refactor(android): [CB-14047](https://issues.apache.org/jira/browse/14047): CameraLauncher: Replacing Repeated String literals with final variables ([#319](https://github.com/apache/cordova-plugin-camera/issues/319)) ([`5ec121b`](https://github.com/apache/cordova-plugin-camera/commit/5ec121b)) -- fix(windows): [CB-11714](https://issues.apache.org/jira/browse/11714): added extra check for content-type in savePhoto() without options.targetWidth/Height ([#242](https://github.com/apache/cordova-plugin-camera/issues/242)) ([`a201722`](https://github.com/apache/cordova-plugin-camera/commit/a201722), [`dc73954`](https://github.com/apache/cordova-plugin-camera/commit/dc73954), [`dca4b9c`](https://github.com/apache/cordova-plugin-camera/commit/dca4b9c), [`c1b9772`](https://github.com/apache/cordova-plugin-camera/commit/c1b9772), [`eb57b02`](https://github.com/apache/cordova-plugin-camera/commit/eb57b02)) +- feat(android): [CB-14017](https://issues.apache.org/jira/browse/CB-14017): Make com.android.support:support-v4 version configurable ([#318](https://github.com/apache/cordova-plugin-camera/issues/318)) ([`e334656`](https://github.com/apache/cordova-plugin-camera/commit/e334656)) +- refactor(android): [CB-14047](https://issues.apache.org/jira/browse/CB-14047): CameraLauncher: Replacing Repeated String literals with final variables ([#319](https://github.com/apache/cordova-plugin-camera/issues/319)) ([`5ec121b`](https://github.com/apache/cordova-plugin-camera/commit/5ec121b)) +- fix(windows): [CB-11714](https://issues.apache.org/jira/browse/CB-11714): added extra check for content-type in savePhoto() without options.targetWidth/Height ([#242](https://github.com/apache/cordova-plugin-camera/issues/242)) ([`a201722`](https://github.com/apache/cordova-plugin-camera/commit/a201722), [`dc73954`](https://github.com/apache/cordova-plugin-camera/commit/dc73954), [`dca4b9c`](https://github.com/apache/cordova-plugin-camera/commit/dca4b9c), [`c1b9772`](https://github.com/apache/cordova-plugin-camera/commit/c1b9772), [`eb57b02`](https://github.com/apache/cordova-plugin-camera/commit/eb57b02)) ### 4.0.3 (Apr 12, 2018) From 43d6591d9ebeaf1962cc3853df242b9378a6c22a Mon Sep 17 00:00:00 2001 From: Norman Breau Date: Wed, 14 Oct 2020 21:51:20 -0300 Subject: [PATCH 3/9] Revert "fix(android): Declare CAMERA permission" (#677) This reverts commit 140e8861e30164da0861fec548d0aa2413197e12. --- plugin.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 704744d..5b7ab1d 100644 --- a/plugin.xml +++ b/plugin.xml @@ -56,7 +56,6 @@ - Date: Sat, 17 Oct 2020 04:48:22 +0200 Subject: [PATCH 4/9] Bugfix issue 341 save to photo gallery - Fixes #341, fixes #577 (#669) * GH-341 - GH-577 Fixed the Save Photo To Album starting from camera - Android - saveToPhotoAlbum feature fixed by taken into count content - uri. (writeUncompressedImage method) ( see: https://github.com/apache/cordova-plugin-camera/issues/611#issuecomment-700273405 ) - make saveToPhotoAlbum future proof by using the MediaStore to insert the taken image - made a method to calculate the compressFormat based on the encodingType (JPEG or PNG) - layout of the performCrop method is adjusted - removed unused rotate variable inside processResultFromGallery method * Add extra VO class to the plugin.xml * added package declaration to new VO * GH-341 - GH-577 https://github.com/apache/cordova-plugin-camera/pull/669#discussion_r504632953 listen to review --- plugin.xml | 1 + src/android/CameraLauncher.java | 177 ++++++++++++++++---------------- src/android/GalleryPathVO.java | 25 +++++ 3 files changed, 112 insertions(+), 91 deletions(-) create mode 100644 src/android/GalleryPathVO.java diff --git a/plugin.xml b/plugin.xml index 5b7ab1d..7cbd19e 100644 --- a/plugin.xml +++ b/plugin.xml @@ -73,6 +73,7 @@ + diff --git a/src/android/CameraLauncher.java b/src/android/CameraLauncher.java index cc8a0e3..32a27d4 100644 --- a/src/android/CameraLauncher.java +++ b/src/android/CameraLauncher.java @@ -21,6 +21,7 @@ package org.apache.cordova.camera; import android.Manifest; import android.app.Activity; import android.content.ActivityNotFoundException; +import android.content.ContentResolver; import android.content.ContentValues; import android.content.Intent; import android.content.pm.PackageManager; @@ -34,6 +35,7 @@ import android.media.ExifInterface; import android.media.MediaScannerConnection; import android.media.MediaScannerConnection.MediaScannerConnectionClient; import android.net.Uri; +import android.os.Build; import android.os.Bundle; import android.os.Environment; import android.provider.MediaStore; @@ -51,7 +53,6 @@ import org.json.JSONException; import java.io.ByteArrayOutputStream; import java.io.File; -import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; @@ -405,58 +406,57 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect } } - - /** - * Brings up the UI to perform crop on passed image URI - * - * @param picUri - */ - private void performCrop(Uri picUri, int destType, Intent cameraIntent) { - try { - Intent cropIntent = new Intent("com.android.camera.action.CROP"); - // indicate image type and Uri - cropIntent.setDataAndType(picUri, "image/*"); - // set crop properties - cropIntent.putExtra("crop", "true"); + /** + * Brings up the UI to perform crop on passed image URI + * + * @param picUri + */ + private void performCrop(Uri picUri, int destType, Intent cameraIntent) { + try { + Intent cropIntent = new Intent("com.android.camera.action.CROP"); + // indicate image type and Uri + cropIntent.setDataAndType(picUri, "image/*"); + // set crop properties + cropIntent.putExtra("crop", "true"); - // indicate output X and Y - if (targetWidth > 0) { - cropIntent.putExtra("outputX", targetWidth); + // indicate output X and Y + if (targetWidth > 0) { + cropIntent.putExtra("outputX", targetWidth); + } + if (targetHeight > 0) { + cropIntent.putExtra("outputY", targetHeight); + } + if (targetHeight > 0 && targetWidth > 0 && targetWidth == targetHeight) { + cropIntent.putExtra("aspectX", 1); + cropIntent.putExtra("aspectY", 1); + } + // create new file handle to get full resolution crop + croppedFilePath = createCaptureFile(this.encodingType, System.currentTimeMillis() + "").getAbsolutePath(); + croppedUri = Uri.parse(croppedFilePath); + cropIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); + cropIntent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION); + cropIntent.putExtra("output", croppedUri); + + + // start the activity - we handle returning in onActivityResult + + if (this.cordova != null) { + this.cordova.startActivityForResult((CordovaPlugin) this, + cropIntent, CROP_CAMERA + destType); + } + } catch (ActivityNotFoundException anfe) { + LOG.e(LOG_TAG, "Crop operation not supported on this device"); + try { + processResultFromCamera(destType, cameraIntent); + } + catch (IOException e) + { + e.printStackTrace(); + LOG.e(LOG_TAG, "Unable to write to file"); + } } - if (targetHeight > 0) { - cropIntent.putExtra("outputY", targetHeight); - } - if (targetHeight > 0 && targetWidth > 0 && targetWidth == targetHeight) { - cropIntent.putExtra("aspectX", 1); - cropIntent.putExtra("aspectY", 1); - } - // create new file handle to get full resolution crop - croppedFilePath = createCaptureFile(this.encodingType, System.currentTimeMillis() + "").getAbsolutePath(); - croppedUri = Uri.parse(croppedFilePath); - cropIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); - cropIntent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION); - cropIntent.putExtra("output", croppedUri); - - - // start the activity - we handle returning in onActivityResult - - if (this.cordova != null) { - this.cordova.startActivityForResult((CordovaPlugin) this, - cropIntent, CROP_CAMERA + destType); - } - } catch (ActivityNotFoundException anfe) { - LOG.e(LOG_TAG, "Crop operation not supported on this device"); - try { - processResultFromCamera(destType, cameraIntent); - } - catch (IOException e) - { - e.printStackTrace(); - LOG.e(LOG_TAG, "Unable to write to file"); - } } - } /** * Applies all needed transformation to the image received from the camera. @@ -494,16 +494,18 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect // 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 <= 28) { // Between LOLLIPOP_MR1 and P, can be changed later to the constant Build.VERSION_CODES.P + writeTakenPictureToGalleryLowerThanAndroidQ(galleryUri); + } else { // Android Q or higher + writeTakenPictureToGalleryStartingFromAndroidQ(galleryPathVO); + } } - - refreshGallery(galleryUri); } // If sending base64 image back @@ -567,9 +569,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect // Add compressed version of captured image to returned media store Uri OutputStream os = this.cordova.getActivity().getContentResolver().openOutputStream(uri); - CompressFormat compressFormat = encodingType == JPEG ? - CompressFormat.JPEG : - CompressFormat.PNG; + CompressFormat compressFormat = getCompressFormatForEncodingType(encodingType); bitmap.compress(compressFormat, this.mQuality, os); os.close(); @@ -597,18 +597,41 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect bitmap = null; } - private String getPicturesPath() { + private void writeTakenPictureToGalleryLowerThanAndroidQ(Uri galleryUri) throws IOException { + writeUncompressedImage(imageUri, galleryUri); + refreshGallery(galleryUri); + } + + private void writeTakenPictureToGalleryStartingFromAndroidQ(GalleryPathVO galleryPathVO) throws IOException { + // Starting from Android Q, working with the ACTION_MEDIA_SCANNER_SCAN_FILE intent is deprecated + // https://developer.android.com/reference/android/content/Intent#ACTION_MEDIA_SCANNER_SCAN_FILE + // we must start working with the MediaStore from Android Q on. + ContentResolver resolver = this.cordova.getActivity().getContentResolver(); + ContentValues contentValues = new ContentValues(); + contentValues.put(MediaStore.MediaColumns.DISPLAY_NAME, galleryPathVO.getGalleryFileName()); + contentValues.put(MediaStore.MediaColumns.MIME_TYPE, getMimetypeForFormat(encodingType)); + Uri galleryOutputUri = resolver.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, contentValues); + + InputStream fileStream = org.apache.cordova.camera.FileHelper.getInputStreamFromUriString(imageUri.toString(), cordova); + writeUncompressedImage(fileStream, galleryOutputUri); + } + + private CompressFormat getCompressFormatForEncodingType(int encodingType) { + return encodingType == JPEG ? CompressFormat.JPEG : CompressFormat.PNG; + } + + private GalleryPathVO getPicturesPath() { String timeStamp = new SimpleDateFormat(TIME_FORMAT).format(new Date()); String imageFileName = "IMG_" + timeStamp + (this.encodingType == JPEG ? JPEG_EXTENSION : PNG_EXTENSION); File storageDir = Environment.getExternalStoragePublicDirectory( Environment.DIRECTORY_PICTURES); storageDir.mkdirs(); - String galleryPath = storageDir.getAbsolutePath() + "/" + imageFileName; - return galleryPath; + return new GalleryPathVO(storageDir.getAbsolutePath(), imageFileName); } private void refreshGallery(Uri contentUri) { Intent mediaScanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE); + // Starting from Android Q, working with the ACTION_MEDIA_SCANNER_SCAN_FILE intent is deprecated mediaScanIntent.setData(contentUri); this.cordova.getActivity().sendBroadcast(mediaScanIntent); } @@ -640,9 +663,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect String modifiedPath = getTempDirectoryPath() + "/" + fileName; OutputStream os = new FileOutputStream(modifiedPath); - CompressFormat compressFormat = this.encodingType == JPEG ? - CompressFormat.JPEG : - CompressFormat.PNG; + CompressFormat compressFormat = getCompressFormatForEncodingType(this.encodingType); bitmap.compress(compressFormat, this.mQuality, os); os.close(); @@ -679,7 +700,6 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect return; } } - int rotate = 0; String fileLocation = FileHelper.getRealPath(uri, this.cordova); LOG.d(LOG_TAG, "File location is: " + fileLocation); @@ -900,34 +920,11 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect private void writeUncompressedImage(Uri src, Uri dest) throws FileNotFoundException, IOException { - FileInputStream fis = new FileInputStream(FileHelper.stripFileProtocol(src.toString())); + InputStream fis = FileHelper.getInputStreamFromUriString(src.toString(), cordova); writeUncompressedImage(fis, dest); } - /** - * Create entry in media store for image - * - * @return uri - */ - private Uri getUriFromMediaStore() { - ContentValues values = new ContentValues(); - values.put(MediaStore.Images.Media.MIME_TYPE, JPEG_MIME_TYPE); - Uri uri; - try { - uri = this.cordova.getActivity().getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values); - } catch (RuntimeException e) { - LOG.d(LOG_TAG, "Can't write to external media storage."); - try { - uri = this.cordova.getActivity().getContentResolver().insert(MediaStore.Images.Media.INTERNAL_CONTENT_URI, values); - } catch (RuntimeException ex) { - LOG.d(LOG_TAG, "Can't write to internal media storage."); - return null; - } - } - return uri; - } - /** * Return a scaled and rotated bitmap based on the target width and height * @@ -1258,9 +1255,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect */ public void processPicture(Bitmap bitmap, int encodingType) { ByteArrayOutputStream jpeg_data = new ByteArrayOutputStream(); - CompressFormat compressFormat = encodingType == JPEG ? - CompressFormat.JPEG : - CompressFormat.PNG; + CompressFormat compressFormat = getCompressFormatForEncodingType(encodingType); try { if (bitmap.compress(compressFormat, mQuality, jpeg_data)) { diff --git a/src/android/GalleryPathVO.java b/src/android/GalleryPathVO.java new file mode 100644 index 0000000..4f2e7af --- /dev/null +++ b/src/android/GalleryPathVO.java @@ -0,0 +1,25 @@ +package org.apache.cordova.camera; + +public class GalleryPathVO { + private final String galleryPath; + private String picturesDirectory; + private String galleryFileName; + + public GalleryPathVO(String picturesDirectory, String galleryFileName) { + this.picturesDirectory = picturesDirectory; + this.galleryFileName = galleryFileName; + this.galleryPath = this.picturesDirectory + "/" + this.galleryFileName; + } + + public String getGalleryPath() { + return galleryPath; + } + + public String getPicturesDirectory() { + return picturesDirectory; + } + + public String getGalleryFileName() { + return galleryFileName; + } +} From 2d1ee66a2b6459540967d578cc534dc893546e12 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Wed, 28 Oct 2020 18:47:10 +0100 Subject: [PATCH 5/9] fix(ios): correctly append exif on iOS 14 (#685) --- src/ios/CDVCamera.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ios/CDVCamera.m b/src/ios/CDVCamera.m index 0d6e7e5..2f2738b 100644 --- a/src/ios/CDVCamera.m +++ b/src/ios/CDVCamera.m @@ -651,13 +651,15 @@ static NSString* toBase64(NSData* data) { CDVPluginResult* result = nil; if (self.metadata) { - CGImageSourceRef sourceImage = CGImageSourceCreateWithData((__bridge CFDataRef)self.data, NULL); + NSData* dataCopy = [self.data mutableCopy]; + CGImageSourceRef sourceImage = CGImageSourceCreateWithData((__bridge CFDataRef)dataCopy, NULL); CFStringRef sourceType = CGImageSourceGetType(sourceImage); CGImageDestinationRef destinationImage = CGImageDestinationCreateWithData((__bridge CFMutableDataRef)self.data, sourceType, 1, NULL); CGImageDestinationAddImageFromSource(destinationImage, sourceImage, 0, (__bridge CFDictionaryRef)self.metadata); CGImageDestinationFinalize(destinationImage); + dataCopy = nil; CFRelease(sourceImage); CFRelease(destinationImage); } From 8975171d7a80776660094baf9c78b698ec85c3db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=B9?= Date: Wed, 4 Nov 2020 10:12:19 +0900 Subject: [PATCH 6/9] chore(android): add missing apache license header (#686) --- src/android/GalleryPathVO.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/android/GalleryPathVO.java b/src/android/GalleryPathVO.java index 4f2e7af..5790443 100644 --- a/src/android/GalleryPathVO.java +++ b/src/android/GalleryPathVO.java @@ -1,3 +1,21 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ package org.apache.cordova.camera; public class GalleryPathVO { From 0d13b71d337f74d5094973c4ebde9bf9b866cf48 Mon Sep 17 00:00:00 2001 From: Erisu Date: Wed, 4 Nov 2020 10:24:25 +0900 Subject: [PATCH 7/9] Updated version and RELEASENOTES.md for release 5.0.1 (camera-20201104) --- RELEASENOTES.md | 8 ++++++++ package-lock.json | 2 +- package.json | 2 +- plugin.xml | 2 +- tests/package.json | 2 +- tests/plugin.xml | 2 +- 6 files changed, 13 insertions(+), 5 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 40ce358..7c8ba3f 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -20,6 +20,14 @@ --> # Release Notes +### 5.0.1 (Nov 04, 2020) + +* [GH-686](https://github.com/apache/cordova-plugin-camera/pull/686) chore(android): add missing apache license header +* [GH-685](https://github.com/apache/cordova-plugin-camera/pull/685) fix(ios): correctly append exif on **iOS** 14 +* [GH-669](https://github.com/apache/cordova-plugin-camera/pull/669) fix(android): save to photo gallery - fixes issues [#341](https://github.com/apache/cordova-plugin-camera/pull/341) & [#577](https://github.com/apache/cordova-plugin-camera/pull/577) +* [GH-672](https://github.com/apache/cordova-plugin-camera/pull/672) chore: Fix JIRA links in RELEASENOTES.md +* [GH-664](https://github.com/apache/cordova-plugin-camera/pull/664) chore: Update RELEASENOTES + ### 5.0.0 (Sep 14, 2020) * [GH-648](https://github.com/apache/cordova-plugin-camera/pull/648) ci(travis): update osx xcode image diff --git a/package-lock.json b/package-lock.json index 635455e..1154f17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-camera", - "version": "5.0.1-dev", + "version": "5.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index b4c736f..966b405 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-camera", - "version": "5.0.1-dev", + "version": "5.0.1", "description": "Cordova Camera Plugin", "types": "./types/index.d.ts", "cordova": { diff --git a/plugin.xml b/plugin.xml index 7cbd19e..de5cf2c 100644 --- a/plugin.xml +++ b/plugin.xml @@ -21,7 +21,7 @@ + version="5.0.1"> Camera Cordova Camera Plugin Apache 2.0 diff --git a/tests/package.json b/tests/package.json index ce938ba..729216f 100644 --- a/tests/package.json +++ b/tests/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-camera-tests", - "version": "5.0.1-dev", + "version": "5.0.1", "description": "", "cordova": { "id": "cordova-plugin-camera-tests", diff --git a/tests/plugin.xml b/tests/plugin.xml index 7547ba1..fcdfa0b 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -22,7 +22,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:rim="http://www.blackberry.com/ns/widgets" id="cordova-plugin-camera-tests" - version="5.0.1-dev"> + version="5.0.1"> Cordova Camera Plugin Tests Apache 2.0 From db2ffedecc23993e2393a6226a63bd05998f0f01 Mon Sep 17 00:00:00 2001 From: Erisu Date: Mon, 9 Nov 2020 18:15:06 +0900 Subject: [PATCH 8/9] Increment package version to 5.0.2-dev --- package-lock.json | 2 +- package.json | 2 +- plugin.xml | 2 +- tests/package.json | 2 +- tests/plugin.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1154f17..f19d519 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-camera", - "version": "5.0.1", + "version": "5.0.2-dev", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 966b405..549da49 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-camera", - "version": "5.0.1", + "version": "5.0.2-dev", "description": "Cordova Camera Plugin", "types": "./types/index.d.ts", "cordova": { diff --git a/plugin.xml b/plugin.xml index de5cf2c..5a5cb07 100644 --- a/plugin.xml +++ b/plugin.xml @@ -21,7 +21,7 @@ + version="5.0.2-dev"> Camera Cordova Camera Plugin Apache 2.0 diff --git a/tests/package.json b/tests/package.json index 729216f..e8e6efc 100644 --- a/tests/package.json +++ b/tests/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-camera-tests", - "version": "5.0.1", + "version": "5.0.2-dev", "description": "", "cordova": { "id": "cordova-plugin-camera-tests", diff --git a/tests/plugin.xml b/tests/plugin.xml index fcdfa0b..9e4b13b 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -22,7 +22,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:rim="http://www.blackberry.com/ns/widgets" id="cordova-plugin-camera-tests" - version="5.0.1"> + version="5.0.2-dev"> Cordova Camera Plugin Tests Apache 2.0 From b43c78b41997294d08fc8c17a3b286a5eba5fa6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=B9?= Date: Sat, 28 Nov 2020 17:12:32 +0900 Subject: [PATCH 9/9] ci: add node-14.x to workflow (#691) --- .appveyor.yml | 1 + .travis.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 503030b..8149df9 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -15,6 +15,7 @@ environment: matrix: - nodejs_version: "10" - nodejs_version: "12" + - nodejs_version: "14" platform: - x86 diff --git a/.travis.yml b/.travis.yml index fa34c06..63e6cc8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ env: - ANDROID_BUILD_TOOLS_VERSION=29.0.2 language: node_js -node_js: 12 +node_js: 14 # yaml anchor/alias: https://medium.com/@tommyvn/travis-yml-dry-with-anchors-8b6a3ac1b027