Compare commits

..

11 Commits
4.0.0 ... 4.0.2

Author SHA1 Message Date
Suraj Pindoria
4b276ee534 CB-13826 Updated version and RELEASENOTES.md for release 4.0.2 2018-01-25 11:40:16 -08:00
Joe Bowser
4b99623eda Merge pull request #308 from okode/android8_permission_request_fix
CB-13781: (android) Fixed permissions request on Android 8 to save a …
2018-01-15 14:13:07 -08:00
rpanadero
36ea63a60f CB-13781: (android) Fixed permissions request on Android 8 to save a photo into the photo album 2018-01-15 13:05:10 +01:00
jcesarmobile
e6a4738031 Merge pull request #307 from jcesarmobile/CB-13747
CB-13747: Add build-tools-26.0.2 to travis
2018-01-10 23:46:04 +01:00
Julio César
c46fe3b31d CB-13747: Add build-tools-26.0.2 to travis 2018-01-09 20:32:55 +01:00
jcesarmobile
67718544a8 Fix release notes (#304) 2017-12-30 00:59:38 -05:00
Simon MacDonald
b00cf97a04 Set VERSION to 4.0.2-dev (via coho) 2017-12-27 19:13:49 -05:00
Simon MacDonald
fb02f48745 CB-13714 Updated version and RELEASENOTES.md for release 4.0.1 (via coho) 2017-12-27 19:13:36 -05:00
jcesarmobile
6bf45f005a Merge pull request #303 from jcesarmobile/CB-13701
CB-13701 Fix to allow 4.0.0 version install
2017-12-27 10:55:32 +01:00
Julio César
96b7f55ec2 CB-13701Fix to allow 4.0.0 version install 2017-12-27 00:00:45 +01:00
Steve Gill
82f1c83a76 Set VERSION to 4.0.1-dev (via coho) 2017-12-15 17:26:41 -08:00
6 changed files with 22 additions and 9 deletions

View File

@@ -46,6 +46,7 @@ matrix:
components:
- tools
- extra-android-m2repository
- build-tools-26.0.2
- env: PLATFORM=android-5.1
os: linux
language: android
@@ -54,6 +55,7 @@ matrix:
components:
- tools
- extra-android-m2repository
- build-tools-26.0.2
- env: PLATFORM=android-6.0
os: linux
language: android
@@ -62,6 +64,7 @@ matrix:
components:
- tools
- extra-android-m2repository
- build-tools-26.0.2
- env: PLATFORM=android-7.0
os: linux
language: android
@@ -70,6 +73,7 @@ matrix:
components:
- tools
- extra-android-m2repository
- build-tools-26.0.2
before_install:
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
- node --version

View File

@@ -7,9 +7,9 @@
# 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
@@ -20,6 +20,13 @@
-->
# Release Notes
### 4.0.2 (Jan 24, 2018)
* [CB-13781](https://issues.apache.org/jira/browse/CB-13781) (android) Fixed permissions request on **Android** 8 to save a photo into the photo album
* [CB-13747](https://issues.apache.org/jira/browse/CB-13747) Add build-tools-26.0.2 to travis
### 4.0.1 (Dec 27, 2017)
* CB-13701Fix to allow 4.0.0 version install
### 4.0.0 (Dec 15, 2017)
* [CB-13661](https://issues.apache.org/jira/browse/CB-13661) Remove deprecated platforms

View File

@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-camera",
"version": "4.0.0",
"version": "4.0.2",
"description": "Cordova Camera Plugin",
"types": "./types/index.d.ts",
"cordova": {
@@ -43,7 +43,7 @@
"3.0.0": {
"cordova-android": ">=6.3.0"
},
"4.0.0": {
"5.0.0": {
"cordova": ">100"
}
}

View File

@@ -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"
version="4.0.0">
version="4.0.2">
<name>Camera</name>
<description>Cordova Camera Plugin</description>
<license>Apache 2.0</license>

View File

@@ -113,7 +113,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
private boolean orientationCorrected; // Has the picture's orientation been corrected
private boolean allowEdit; // Should we allow the user to crop the image.
protected final static String[] permissions = { Manifest.permission.CAMERA, Manifest.permission.READ_EXTERNAL_STORAGE };
protected final static String[] permissions = { Manifest.permission.CAMERA, Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE };
public CallbackContext callbackContext;
private int numPics;
@@ -245,7 +245,8 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
* @param encodingType Compression quality hint (0-100: 0=low quality & high compression, 100=compress of max quality)
*/
public void callTakePicture(int returnType, int encodingType) {
boolean saveAlbumPermission = PermissionHelper.hasPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE);
boolean saveAlbumPermission = PermissionHelper.hasPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE)
&& PermissionHelper.hasPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);
boolean takePicturePermission = PermissionHelper.hasPermission(this, Manifest.permission.CAMERA);
// CB-10120: The CAMERA permission does not need to be requested unless it is declared
@@ -276,7 +277,8 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
} else if (saveAlbumPermission && !takePicturePermission) {
PermissionHelper.requestPermission(this, TAKE_PIC_SEC, Manifest.permission.CAMERA);
} else if (!saveAlbumPermission && takePicturePermission) {
PermissionHelper.requestPermission(this, TAKE_PIC_SEC, Manifest.permission.READ_EXTERNAL_STORAGE);
PermissionHelper.requestPermissions(this, TAKE_PIC_SEC,
new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE});
} else {
PermissionHelper.requestPermissions(this, TAKE_PIC_SEC, permissions);
}

View File

@@ -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="4.0.0">
version="4.0.2">
<name>Cordova Camera Plugin Tests</name>
<license>Apache 2.0</license>