mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2026-02-14 00:04:54 +08:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b276ee534 | ||
|
|
4b99623eda | ||
|
|
36ea63a60f | ||
|
|
e6a4738031 | ||
|
|
c46fe3b31d | ||
|
|
67718544a8 | ||
|
|
b00cf97a04 | ||
|
|
fb02f48745 | ||
|
|
6bf45f005a | ||
|
|
96b7f55ec2 | ||
|
|
82f1c83a76 |
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user