Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera fix for Android Oreo (8.0) devices #1

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
df75098
Added default text strings for iOS camera and photo library access
Dec 13, 2016
3a3ba70
iOS build were failing when default usage string was anything but empty
Dec 14, 2016
d3aed9b
fix iOS cli build
Dec 14, 2016
2805172
Hardcoded the iOS camera and photo library usage strings
Dec 14, 2016
96f24e6
Added default to NSLocationWhenInUseUsageDescription
Dec 21, 2016
8b3114e
Added support for Android SDK >= 24
Jan 30, 2017
b386dfa
update gitignore
Jan 30, 2017
4ae3d93
Added provider tag
Jan 30, 2017
7ba2d08
Update Cordovauri file
michaeloki Feb 14, 2018
bfb02fd
Update Cameralauncher
michaeloki Feb 14, 2018
1aff4a1
Update FileHelper.java
michaeloki Feb 14, 2018
ad7f4c6
Update CameraLauncher.java
michaeloki Feb 16, 2018
80a57bd
Updated CameraLauncher.java
michaeloki Feb 20, 2018
71dfd3c
Updated FileHelper.java
michaeloki Feb 20, 2018
82dee86
Updated CordovaUri.java
michaeloki Feb 20, 2018
47523a2
Updated ExifHelper.java
michaeloki Feb 20, 2018
f0cdd29
Updated readme
michaeloki Feb 20, 2018
0383283
Updated package.json
michaeloki Feb 20, 2018
973e27b
Update plugin.xml
michaeloki Feb 20, 2018
b4f2924
Update RELEASENOTES.md
michaeloki Feb 20, 2018
1ce0128
Update LICENSE
michaeloki Feb 20, 2018
40aaa58
Update index.md
michaeloki Feb 20, 2018
160b1bb
Update .gitignore
michaeloki Feb 20, 2018
83cd4f6
Update plugin.xml
michaeloki Feb 20, 2018
21f173a
Update Camera.js
michaeloki Feb 20, 2018
51ec1c4
Update README.md
michaeloki Feb 20, 2018
8d2a9af
Update package.json
michaeloki Feb 20, 2018
d312f61
Update plugin.xml
michaeloki Feb 20, 2018
0954076
Update package.json
michaeloki Feb 20, 2018
975eca7
Update CameraLauncher.java
michaeloki Feb 20, 2018
da82159
Update CameraLauncher.java
michaeloki Feb 21, 2018
1d6bdbf
Update FileHelper.java
michaeloki Feb 21, 2018
bcb672f
Update CameraLauncher.java
michaeloki Feb 21, 2018
c9a5a9a
Update CameraLauncher.java
michaeloki Feb 21, 2018
3570dfe
Updated CameraLauncher
michaeloki Feb 21, 2018
e5508e7
Update CameraLauncher.java
michaeloki Feb 22, 2018
9cacd50
Update CameraLauncher.java
michaeloki Feb 22, 2018
ded57e9
Update plugin.xml
michaeloki Feb 26, 2018
120e8cd
Update package.json
michaeloki Feb 26, 2018
77c05f5
Update README.md
michaeloki Feb 26, 2018
b054f5a
Update plugin.xml
michaeloki Feb 27, 2018
f390b56
Update package.json
michaeloki Feb 27, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
*.DS_Store
*.DS_Store
.DS_Store
*.DS_Store
www/.DS_Store
*.DS_Store
*.DS_Store
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Apache License
Version 2.0, January 2004
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
Expand Down Expand Up @@ -199,4 +199,4 @@
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.
limitations under the License.
638 changes: 256 additions & 382 deletions README.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,6 @@
* Renamed test dir, added nested plugin.xml
* CB-6958 added manual tests
* CB-6958 Port camera tests to plugin-test-framework

### 1.2.3 (Feb 20, 2018)
* MO-101 Added support for Android Oreo
4 changes: 3 additions & 1 deletion doc/fr/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ Vous pouvez faire ce que vous voulez avec l'image encodée ou l'URI, par exemple

* Publier les données sur un serveur distant

* Android 8

[1]: http://brianleroux.github.com/lawnchair/

**NOTE**: la résolution de Photo sur les nouveaux appareils est assez bonne. Les photos sélectionnées de la Galerie de l'appareil ne sont pas réduites avec une baisse de la qualité, même si un paramètre de `qualité` est spécifié. Pour éviter les problèmes de mémoire, définissez `Camera.destinationType` à `FILE_URI` plutôt que `DATA_URL`.
Expand Down Expand Up @@ -414,4 +416,4 @@ Supprime les intermédiaires les fichiers image qui sont gardées en dépôt tem

function onFail(message) {
alert('Failed because: ' + message);
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-camera-with-exif",
"version": "1.1.5",
"version": "1.2.3",
"description": "Cordova Camera Plugin that will return an image as well as the EXIF data (including GPS location) on iOS and Android devices.",
"cordova": {
"id": "cordova-plugin-camera-with-exif",
Expand Down
86 changes: 50 additions & 36 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:rim="http://www.blackberry.com/ns/widgets"
id="cordova-plugin-camera-with-exif"
version="1.1.5">
version="1.2.3">

<name>cordova-plugin-camera-with-exif</name>
<description>
Expand All @@ -20,7 +20,7 @@
<engine name="cordova" version="&gt;=3.0.0" />
</engines>

<dependency id="cordova-plugin-compat" version="^1.0.0" />
<dependency id="cordova-plugin-compat" version="^1.1.0" />

<js-module src="www/CameraConstants.js" name="Camera">
<clobbers target="Camera" />
Expand Down Expand Up @@ -57,16 +57,32 @@
<config-file target="AndroidManifest.xml" parent="/*">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</config-file>

<config-file target="AndroidManifest.xml" parent="application">
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true" >
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>
</config-file>

<source-file src="src/android/CameraLauncher.java" target-dir="src/org/apache/cordova/camera" />
<source-file src="src/android/CordovaUri.java" target-dir="src/org/apache/cordova/camera" />
<source-file src="src/android/FileHelper.java" target-dir="src/org/apache/cordova/camera" />
<source-file src="src/android/ExifHelper.java" target-dir="src/org/apache/cordova/camera" />
<source-file src="src/android/gson-2.3.1.jar" target-dir="libs" />
<source-file src="src/android/xml/provider_paths.xml" target-dir="res/xml" />

<js-module src="www/CameraPopoverHandle.js" name="CameraPopoverHandle">
<clobbers target="CameraPopoverHandle" />
</js-module>

<framework src="com.android.support:support-v4:24.1.1+" />

</platform>

<!-- amazon-fireos -->
Expand Down Expand Up @@ -113,45 +129,43 @@

<!-- ios -->
<platform name="ios">
<config-file target="config.xml" parent="/*">
<feature name="Camera">
<param name="ios-package" value="CDVCamera" />
</feature>
<preference name="CameraUsesGeolocation" value="true" />
</config-file>

<js-module src="www/ios/CameraPopoverHandle.js" name="CameraPopoverHandle">
<config-file target="config.xml" parent="/*">
<feature name="Camera">
<param name="ios-package" value="CDVCamera" />
</feature>
<preference name="CameraUsesGeolocation" value="true" />
</config-file>

<js-module src="www/ios/CameraPopoverHandle.js" name="CameraPopoverHandle">
<clobbers target="CameraPopoverHandle" />
</js-module>

<header-file src="src/ios/UIImage+CropScaleOrientation.h" />
<source-file src="src/ios/UIImage+CropScaleOrientation.m" />
<header-file src="src/ios/CDVCamera.h" />
<source-file src="src/ios/CDVCamera.m" />
<header-file src="src/ios/CDVJpegHeaderWriter.h" />
<source-file src="src/ios/CDVJpegHeaderWriter.m" />
<header-file src="src/ios/CDVExif.h" />
<framework src="ImageIO.framework" weak="true" />
<framework src="CoreLocation.framework" />
<framework src="CoreGraphics.framework" />
<framework src="AssetsLibrary.framework" />
<framework src="MobileCoreServices.framework" />
<framework src="CoreGraphics.framework" />
<framework src="CoreImage.framework" />
<framework src="AVFoundation.framework" />

<config-file target="*-Info.plist" parent="NSLocationWhenInUseUsageDescription">
<string></string>
</config-file>

<preference name="CAMERA_USAGE_DESCRIPTION" default=" " />
</js-module>

<header-file src="src/ios/UIImage+CropScaleOrientation.h" />
<source-file src="src/ios/UIImage+CropScaleOrientation.m" />
<header-file src="src/ios/CDVCamera.h" />
<source-file src="src/ios/CDVCamera.m" />
<header-file src="src/ios/CDVJpegHeaderWriter.h" />
<source-file src="src/ios/CDVJpegHeaderWriter.m" />
<header-file src="src/ios/CDVExif.h" />
<framework src="ImageIO.framework" weak="true" />
<framework src="CoreLocation.framework" />
<framework src="CoreGraphics.framework" />
<framework src="AssetsLibrary.framework" />
<framework src="MobileCoreServices.framework" />
<framework src="CoreGraphics.framework" />
<framework src="CoreImage.framework" />
<framework src="AVFoundation.framework" />

<config-file target="*-Info.plist" parent="NSCameraUsageDescription">
<string>$CAMERA_USAGE_DESCRIPTION</string>
<string>This app requires access to the camera to take photos.</string>
</config-file>

<preference name="PHOTOLIBRARY_USAGE_DESCRIPTION" default=" " />
<config-file target="*-Info.plist" parent="NSPhotoLibraryUsageDescription">
<string>$PHOTOLIBRARY_USAGE_DESCRIPTION</string>
<string>This app requires access to the photo library to display images.</string>
</config-file>

<config-file target="*-Info.plist" parent="NSLocationWhenInUseUsageDescription">
<string>This app requires access to your location when in use to include location info in photo metadata.</string>
</config-file>

</platform>
Expand Down
Loading