mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2026-02-03 00:06:46 +08:00
Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba9a803b69 | ||
|
|
9615620843 | ||
|
|
a33c35152e | ||
|
|
eb98015e8a | ||
|
|
3c48ea9c9c | ||
|
|
2286bb3bb2 | ||
|
|
9badea4c95 | ||
|
|
180f7b5510 | ||
|
|
d0b381aad8 | ||
|
|
926fbf0e8c | ||
|
|
e4ff41c07c | ||
|
|
4fc25154f3 | ||
|
|
7f616d16f1 | ||
|
|
dfbca19a7a | ||
|
|
86e546f868 | ||
|
|
f2ca5ed79f | ||
|
|
ab7e02f0b8 | ||
|
|
899f6d8059 | ||
|
|
aa8a5945dd | ||
|
|
c06480f4e3 | ||
|
|
5ca4d8b082 | ||
|
|
bba8283d98 | ||
|
|
c27725ce66 | ||
|
|
415412cfef | ||
|
|
5ebda25164 | ||
|
|
d29c767f07 | ||
|
|
0ad5bdd9ff | ||
|
|
d6bd9ae3b3 | ||
|
|
81f9433606 | ||
|
|
05594c4646 | ||
|
|
a364e79482 | ||
|
|
42fc8e0bcd | ||
|
|
ee5537694a |
@@ -21,9 +21,9 @@ description: Take pictures with the device camera.
|
||||
# under the License.
|
||||
-->
|
||||
|
||||
|Android|iOS| Windows 8.1 Store | Windows 8.1 Phone | Windows 10 Store | Travis CI |
|
||||
|:-:|:-:|:-:|:-:|:-:|:-:|
|
||||
|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android,PLUGIN=cordova-plugin-camera/)|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-camera/)|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-8.1-store,PLUGIN=cordova-plugin-camera/)|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-8.1-phone,PLUGIN=cordova-plugin-camera/)|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-camera/)|[](https://travis-ci.org/apache/cordova-plugin-camera)
|
||||
|Android 4.4|Android 5.1|Android 6.0|iOS 9.3|iOS 10.0|Windows 10 Store|Travis CI|
|
||||
|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
|
||||
|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-camera/)|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-camera/)|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-6.0,PLUGIN=cordova-plugin-camera/)|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-camera/)|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-camera/)|[](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-camera/)|[](https://travis-ci.org/apache/cordova-plugin-camera)
|
||||
|
||||
# cordova-plugin-camera
|
||||
|
||||
|
||||
430
RELEASENOTES.md
430
RELEASENOTES.md
@@ -20,429 +20,39 @@
|
||||
-->
|
||||
# Release Notes
|
||||
|
||||
### 2.4.1 (Apr 27, 2017)
|
||||
* [CB-12622](https://issues.apache.org/jira/browse/CB-12622) Updated build badges in `README`
|
||||
* [CB-12650](https://issues.apache.org/jira/browse/CB-12650) Fix manual test for uploading image
|
||||
* [CB-12685](https://issues.apache.org/jira/browse/CB-12685) added `package.json` to tests folder
|
||||
* [CB-12622](https://issues.apache.org/jira/browse/CB-12622) (android) Appium tests: Bust **Android** 6 and 7 permission dialogs
|
||||
* [CB-12618](https://issues.apache.org/jira/browse/CB-12618) (android) Appium tests: Handle native cling
|
||||
|
||||
### 2.4.0 (Feb 28, 2017)
|
||||
* [CB-12501](https://issues.apache.org/jira/browse/CB-12501) **Android**: Appium tests don't use `XPath` selectors anymore
|
||||
* [CB-12469](https://issues.apache.org/jira/browse/CB-12469) Appium tests can now run on **iOS 10**
|
||||
* [CB-12005](https://issues.apache.org/jira/browse/CB-12005) Changing the `getOrientation` method to return the defined enumerated `EXIF` instead of orientation in degrees for Consistency
|
||||
* [CB-12368](https://issues.apache.org/jira/browse/CB-12368) Fix permission check on **Android**
|
||||
* [CB-12353](https://issues.apache.org/jira/browse/CB-12353) Corrected merges usage in `plugin.xml`
|
||||
* [CB-12369](https://issues.apache.org/jira/browse/CB-12369) Add plugin typings from `DefinitelyTyped`
|
||||
* [CB-12363](https://issues.apache.org/jira/browse/CB-12363) Added build badges for **iOS 9.3** and **iOS 10.0**
|
||||
* [CB-12312](https://issues.apache.org/jira/browse/CB-12312) [Appium] [Android] A few changes to the tests: - updated comments on how to run the tests. extra comments around functionality at certain points in the automation. - stub of a resolution checker on test startup - still need to figure out acceptable values. - moved session shutdown to an afterAll clause. - changed resolution determiner from using webview-based values to using the native windows dimensions - this helps as the webview values may be scaled down intentionally by manufacturers (via changing devicePixelRatio). furthermore, since the screen dimension automation is used purely for native UI automation, better to use the dimensions reported by the native context rather than the web context. - when finding elements by XPath, use multiple calls to avoid a Windows emulator + Android bug. Made this pattern consistent in the entire test.
|
||||
* [CB-12236](https://issues.apache.org/jira/browse/CB-12236) - Fixed RELEASENOTES for cordova-plugin-camera
|
||||
* [CB-12230](https://issues.apache.org/jira/browse/CB-12230) Removed Windows 8.1 build badges
|
||||
|
||||
### 2.3.1 (Dec 07, 2016)
|
||||
* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 2.3.1
|
||||
* Fix missing license headers.
|
||||
* [CB-12086](https://issues.apache.org/jira/browse/CB-12086) Regenerate README.md from template
|
||||
* Added NSPhotoLibraryUsageDescription parameter to example install command Fixing some usages of NSPhotoLibraryUsageDescriptionentry
|
||||
* Close #124: I can crop fine with Photos. We should not have adopted Crop, since it makes no sense on Android.
|
||||
* Updating compat dependency to 1.1.0 or better
|
||||
* Close #199. We save photos to a shared Pictures directory, similar to the behaviour of the Twitter application
|
||||
* Close #201. Running out of memory shouldn't be graceful.
|
||||
* Close #228. We don't require these permissions on Camera, since we use intents.
|
||||
* Close #241
|
||||
* Bumping the CI
|
||||
* [CB-11625](https://issues.apache.org/jira/browse/CB-11625) Forgot to add CordovaUri.java to plugin.xml
|
||||
* [CB-11625](https://issues.apache.org/jira/browse/CB-11625) Files Provider does not work with Android 4.4.4 or lower, and I have no idea why. Working around with CordovaUri
|
||||
* [CB-11625](https://issues.apache.org/jira/browse/CB-11625) (Android) : Make this work with previous versions of Cordova via cordova-plugin-compat
|
||||
* BuildConfig from test project crept in source code thanks to Android Studio, removing
|
||||
* WTF. Directory, not file. Not sure why I did that
|
||||
* [CB-11625](https://issues.apache.org/jira/browse/CB-11625) Managed to get Content Providers to work with a weird mix of Content Providers and non-Content Providers
|
||||
* Adding provider_paths.xml so this works
|
||||
* Partially modified plugin.xml
|
||||
* [CB-11625](https://issues.apache.org/jira/browse/CB-11625) Working on fix to API 24 no longer allowing File URIs to be passed across intents
|
||||
* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been submitted…"
|
||||
* Closing invalid pull request: close #98
|
||||
* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version.
|
||||
* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Updated version and RELEASENOTES.md for release 2.3.0
|
||||
* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies
|
||||
* [CB-11661](https://issues.apache.org/jira/browse/CB-11661) (ios) Add mandatory iOS 10 privacy description
|
||||
* [CB-11661](https://issues.apache.org/jira/browse/CB-11661) (ios) Add mandatory iOS 10 privacy description
|
||||
* Revert "close #229"
|
||||
* Removed unneeded file
|
||||
* close #229
|
||||
* [CB-11661](https://issues.apache.org/jira/browse/CB-11661) (ios) Add mandatory iOS 10 privacy description
|
||||
* [CB-11714](https://issues.apache.org/jira/browse/CB-11714) (windows) added more explicit content-type when converting to target data on canvas
|
||||
* [CB-11295](https://issues.apache.org/jira/browse/CB-11295) Add WP8.1 quirk when choosing image from photoalbum
|
||||
* [CB-10067](https://issues.apache.org/jira/browse/CB-10067) Update PictureSourceType JSDoc to reflect README update
|
||||
* [CB-9070](https://issues.apache.org/jira/browse/CB-9070) Update CameraPopoverHandle docs to reflect README update
|
||||
* Plugin uses Android Log class and not Cordova LOG class
|
||||
* [CB-11631](https://issues.apache.org/jira/browse/CB-11631) Appium tests: A working fix for a flaky "selection canceled" failure
|
||||
* [CB-11709](https://issues.apache.org/jira/browse/CB-11709) Tests should use resolveLocalFileSystemURL() instead of deprecated resolveFileSystemURI()
|
||||
* Closing invalid PR
|
||||
* [CB-11695](https://issues.apache.org/jira/browse/CB-11695) Increased session creation timeout for Appium tests
|
||||
* [CB-11631](https://issues.apache.org/jira/browse/CB-11631) Appium tests: A fix for a flaky "selection cancelled" failure
|
||||
* [CB-11656](https://issues.apache.org/jira/browse/CB-11656) (Android) Appium tests: Fixed side menu opening on some more resolutions
|
||||
* [CB-11656](https://issues.apache.org/jira/browse/CB-11656) (Android) Appium tests: Fixed side menu opening on certain resolutions
|
||||
* [CB-11376](https://issues.apache.org/jira/browse/CB-11376) (ios): fix CameraUsesGeolocation error
|
||||
* [CB-10067](https://issues.apache.org/jira/browse/CB-10067) (ios) clarifications on PictureSourceType
|
||||
* [CB-11410](https://issues.apache.org/jira/browse/CB-11410) (ios) fix cameraPopoverHandle.setPosition
|
||||
* [CB-9070.](https://issues.apache.org/jira/browse/CB-9070.) (ios) Fixed CameraPopoverHandle documentation
|
||||
* [CB-11447](https://issues.apache.org/jira/browse/CB-11447) Respect output format when retrieving images from gallery
|
||||
* [CB-11447](https://issues.apache.org/jira/browse/CB-11447) Resolve iOS tests failures due to iOS quirks
|
||||
* [CB-11553](https://issues.apache.org/jira/browse/CB-11553) Pend failing Appium tests on Sauce Labs for the time being (reverted from commit b69571724035f41642f3ee612c5b66e1f0c4386c)
|
||||
* [CB-11553](https://issues.apache.org/jira/browse/CB-11553) Pend failing Appium tests on Sauce Labs for the time being
|
||||
* [CB-11498](https://issues.apache.org/jira/browse/CB-11498) [Android] Appium tests should not fail when there is no camera
|
||||
* Add badges for paramedic builds on Jenkins
|
||||
* [CB-11296](https://issues.apache.org/jira/browse/CB-11296) Appium: Better element clicking and session error handling
|
||||
* [CB-11232](https://issues.apache.org/jira/browse/CB-11232) Appium tests: fixed element tapping on iOS 9
|
||||
* [CB-11183](https://issues.apache.org/jira/browse/CB-11183) Appium tests: Added image verification
|
||||
* Closing stale PRs. This closes #114, closes #104
|
||||
* Closing stale PRs. This closes #85, closes #93
|
||||
* fixed some bad formatting that hid HTML tags and added link to sample
|
||||
* Closing stale PRs. Close #167
|
||||
* Closing stale PRs. Close #147
|
||||
* Set android quality default value to 50 on the java code
|
||||
* Moving message in PR template to a comment
|
||||
* Add pull request template. This closes #213
|
||||
* [CB-11228](https://issues.apache.org/jira/browse/CB-11228) browser: Add classes for styling purposes
|
||||
* [CB-10139](https://issues.apache.org/jira/browse/CB-10139) browser: Respect target width and height
|
||||
* Stale PRs: closes #149, closes #148, closes #155, closes #107, closes #71, closes #55, closes #14
|
||||
* [CB-11227](https://issues.apache.org/jira/browse/CB-11227) browser: Fix incorrect mime type
|
||||
* [CB-11162](https://issues.apache.org/jira/browse/CB-11162) Appium tests: retry spec on failure
|
||||
* Reverted indenting done by Android Studio
|
||||
* Adding missing function
|
||||
* [CB-4078](https://issues.apache.org/jira/browse/CB-4078) Fix for orientation/scaling on Android 4.4+ devices
|
||||
* [CB-11165](https://issues.apache.org/jira/browse/CB-11165) removed peer dependency
|
||||
* [CB-11147](https://issues.apache.org/jira/browse/CB-11147) Appium tests: generate descriptive spec names
|
||||
* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md
|
||||
* [CB-11128](https://issues.apache.org/jira/browse/CB-11128) Appum tests: Fixed some of the flaky failures
|
||||
* [CB-11003](https://issues.apache.org/jira/browse/CB-11003) Added Sample section to the Camera plugin README
|
||||
* [CB-11091](https://issues.apache.org/jira/browse/CB-11091) Incremented plugin version.
|
||||
* Updated version and RELEASENOTES.md for release 2.2.0
|
||||
* [CB-10873](https://issues.apache.org/jira/browse/CB-10873) - Avoid crash due to usage of uninitialized variable when writing geolocation data to image destination - Properly handle 'CameraUsesGeolocation' option by properly setting geolocation data in EXIF header in all cases
|
||||
* [CB-10873](https://issues.apache.org/jira/browse/CB-10873) Avoid crash due to usage of uninitialized variable when writing geolocation data to image destination
|
||||
* [CB-11073](https://issues.apache.org/jira/browse/CB-11073) Appium tests stability improvements
|
||||
* Replace PermissionHelper.java with cordova-plugin-compat
|
||||
* Making focus handler work only for windows 10 phone
|
||||
* [CB-10865](https://issues.apache.org/jira/browse/CB-10865) Run ios native tests on Travis
|
||||
* [CB-10120](https://issues.apache.org/jira/browse/CB-10120) android: Fixing use of constants and PermissionHelper
|
||||
* [CB-10120](https://issues.apache.org/jira/browse/CB-10120) android: Fix missing CAMERA permission for Android M
|
||||
* [CB-10756](https://issues.apache.org/jira/browse/CB-10756) Adding sterner warnings about DATA_URL
|
||||
* [CB-10460](https://issues.apache.org/jira/browse/CB-10460) getRealPath return null in some cases
|
||||
* clean RELEASENOTES for bold font
|
||||
* Appium tests: tweaking some timeouts and default screenshot path
|
||||
* [CB-10820](https://issues.apache.org/jira/browse/CB-10820) Incremented plugin version.
|
||||
* [CB-10820](https://issues.apache.org/jira/browse/CB-10820) Updated version and RELEASENOTES.md for release 2.1.1
|
||||
* [CB-10825](https://issues.apache.org/jira/browse/CB-10825) android: Always request READ permission for gallery source
|
||||
* added apache license header to appium files
|
||||
* [CB-10720](https://issues.apache.org/jira/browse/CB-10720) Fixed spelling, capitalization, and other small issues.
|
||||
* [CB-10414](https://issues.apache.org/jira/browse/CB-10414) Adding focus handler to resume video when user comes back on leaving the app while preview was running
|
||||
* Appium tests: adjust swipe distance on Android
|
||||
* [CB-10750](https://issues.apache.org/jira/browse/CB-10750) Appium tests: fail fast if session is irrecoverable
|
||||
* Adding missing semi colon
|
||||
* Adding focus handler to make sure filepicker gets launched when app is active
|
||||
* [CB-10128](https://issues.apache.org/jira/browse/CB-10128) [iOS] Fixed how checks access authorization to camera & library. This closes #146
|
||||
* [CB-10636](https://issues.apache.org/jira/browse/CB-10636) Add JSHint for plugins
|
||||
* [CB-10639](https://issues.apache.org/jira/browse/CB-10639) Appium tests: Added some timeouts, Taking a screenshot on failure, Retry taking a picture up to 3 times, Try to restart the Appium session if it's lost
|
||||
* [CB-10552](https://issues.apache.org/jira/browse/CB-10552) Replacing images in README.md.
|
||||
* Added a lot of more cases to get the real path
|
||||
* Fix for [CB-10625](https://issues.apache.org/jira/browse/CB-10625)
|
||||
* [CB-10619](https://issues.apache.org/jira/browse/CB-10619) Appium tests: Properly switch to webview
|
||||
* [CB-10397](https://issues.apache.org/jira/browse/CB-10397) Added Appium tests
|
||||
* [CB-10576](https://issues.apache.org/jira/browse/CB-10576) MobileSpec can't get results for Windows-Store 8.1 Builds
|
||||
* chore: edit package.json license to match SPDX id
|
||||
* [CB-10539](https://issues.apache.org/jira/browse/CB-10539) Commenting out the verySmallQvga maxResolution option
|
||||
* [CB-10541](https://issues.apache.org/jira/browse/CB-10541) Changing default maxResoltion to be highestAvailable for CameraCaptureUI
|
||||
* [CB-10113](https://issues.apache.org/jira/browse/CB-10113) Browser - Layer camera UI on top of all!
|
||||
* [CB-10502](https://issues.apache.org/jira/browse/CB-10502) Fix camera plugin exception in Chrome when click capture.
|
||||
* Adding comments
|
||||
* Camera tapping fix
|
||||
* [CB-10368](https://issues.apache.org/jira/browse/CB-10368) Incremented plugin version.
|
||||
* [CB-10368](https://issues.apache.org/jira/browse/CB-10368) Updated version and RELEASENOTES.md for release 2.1.0
|
||||
* added .ratignore
|
||||
* [CB-10319](https://issues.apache.org/jira/browse/CB-10319) android: Adding reflective helper methods for permission requests
|
||||
* [CB-9189](https://issues.apache.org/jira/browse/CB-9189) android: Implementing save/restore API to handle Activity destruction
|
||||
* [CB-10241](https://issues.apache.org/jira/browse/CB-10241) - App Crash cause by Camera Plugin ios 7
|
||||
* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Incremented plugin version.
|
||||
* [CB-8940](https://issues.apache.org/jira/browse/CB-8940) Setting z-index values to maximum for UI buttons. This closes #140.
|
||||
* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) linked issues in RELEASENOTES.md
|
||||
* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated version and RELEASENOTES.md for release 2.0.0
|
||||
* removed r prefix from tags
|
||||
* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated RELEASENOTES to be newest to oldest
|
||||
* remove unneeded weakness
|
||||
* [CB-8863](https://issues.apache.org/jira/browse/CB-8863) correct block usage for async calls
|
||||
* [CB-5479](https://issues.apache.org/jira/browse/CB-5479) android: changed saveToPhotoAlbum to save uncompressed images
|
||||
* [CB-9169](https://issues.apache.org/jira/browse/CB-9169) android: Fixed filetype for uncompressed images and added quirk
|
||||
* [CB-9446](https://issues.apache.org/jira/browse/CB-9446) related: Removing CordovaResource library code in favour of the code we're supposed to be deprecating because that at least works.
|
||||
* [CB-9942](https://issues.apache.org/jira/browse/CB-9942) Normalize line endings in Camera plugin docs
|
||||
* [CB-9910](https://issues.apache.org/jira/browse/CB-9910) android: Add permission request for some gallery requests
|
||||
* [CB-7668](https://issues.apache.org/jira/browse/CB-7668) android: Adding a sterner warning for allowedit on Android
|
||||
* Actually fixing the contribute link.
|
||||
* Fixing contribute link.
|
||||
* Using the CordovaResourceApi to fine paths of files in the background thread. If the file doesn't exist, return the content URI We also do a refactor to bring this in line. This code got bike-shedded a bit.
|
||||
* Add engine tag for Cordova-Android 5.0.x
|
||||
* Fix permission handling
|
||||
* [CB-9583](https://issues.apache.org/jira/browse/CB-9583) Permissions for Marshmallow
|
||||
* Closes stale pull requests. Close #91, close #82, close #59, close #20
|
||||
* Try to use realpath filename instead of default modified.jpg
|
||||
* change 'case' to else-if. This closes #113
|
||||
* [CB-6190](https://issues.apache.org/jira/browse/CB-6190) - iOS camera plugin ignores quality parameter
|
||||
* [CB-9633](https://issues.apache.org/jira/browse/CB-9633) iOS Taking a Picture With Option destinationType:NATIVE_URI Doesn't Show Image
|
||||
* [CB-9745](https://issues.apache.org/jira/browse/CB-9745) Camera plugin docs should be generated from the source
|
||||
* [CB-9622](https://issues.apache.org/jira/browse/CB-9622) Windows Phone 8 Camera Option destinationType:NATIVE_URI is a NO-OP
|
||||
* [CB-9623](https://issues.apache.org/jira/browse/CB-9623) Fixes various issues when encodingType set to png
|
||||
* [CB-9591](https://issues.apache.org/jira/browse/CB-9591) Retaining aspect ratio when resizing
|
||||
* [CB-9443](https://issues.apache.org/jira/browse/CB-9443) Pick correct maxResolution This closes #111, closes #56
|
||||
* [CB-9151](https://issues.apache.org/jira/browse/CB-9151) Trigger captureAction only once
|
||||
* [CB-9413](https://issues.apache.org/jira/browse/CB-9413) Close RandomAccessStream once copied
|
||||
* [CB-5661](https://issues.apache.org/jira/browse/CB-5661) Remove outdated iOS quirks about memory
|
||||
* Closing stale pull request: close #106
|
||||
* [CB-9349](https://issues.apache.org/jira/browse/CB-9349) Focus control and nice UI
|
||||
* Closing stale pull request: close #73
|
||||
* Closing stale pull request: close #77
|
||||
* remove travis-ci integration
|
||||
* [CB-9259](https://issues.apache.org/jira/browse/CB-9259) Forgot to add another check on which URI we're using when fixing this thing the first time
|
||||
* [CB-9247](https://issues.apache.org/jira/browse/CB-9247) - typo
|
||||
* [CB-9247](https://issues.apache.org/jira/browse/CB-9247) - Added macro to conditionally add NSData+Base64.h
|
||||
* [CB-9247](https://issues.apache.org/jira/browse/CB-9247) - Fixes compilation errors with cordova-ios 4.x
|
||||
* Fix returning native url on windows.
|
||||
* [CB-9192](https://issues.apache.org/jira/browse/CB-9192) Incremented plugin version.
|
||||
* [CB-9202](https://issues.apache.org/jira/browse/CB-9202) updated repo url to github mirror in package.json
|
||||
* [CB-9192](https://issues.apache.org/jira/browse/CB-9192) Updated version and RELEASENOTES.md for release 1.2.0
|
||||
* Closing stale pull request: close #84
|
||||
* Closing stale pull request: close #66
|
||||
* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-camera documentation translation: cordova-plugin-camera
|
||||
* Update docs. This closes #100
|
||||
* attempt to fix npm markdown issue
|
||||
* [CB-8883](https://issues.apache.org/jira/browse/CB-8883) fix picture rotation issue
|
||||
* one more alias
|
||||
* Fixed some nit white-space issues, aliased a little more
|
||||
* major refactor : readability
|
||||
* Patch for CB-8498, this closes #64
|
||||
* [CB-8879](https://issues.apache.org/jira/browse/CB-8879) fix stripe issue with correct aspect ratio
|
||||
* [CB-8601](https://issues.apache.org/jira/browse/CB-8601) - iOS camera unit tests broken
|
||||
* [CB-7667](https://issues.apache.org/jira/browse/CB-7667) iOS8: Handle case where camera is not authorized (closes #49)
|
||||
* add missing license header
|
||||
* [CB-8959](https://issues.apache.org/jira/browse/CB-8959) Incremented plugin version.
|
||||
* [CB-8959](https://issues.apache.org/jira/browse/CB-8959) Updated version and RELEASENOTES.md for release 1.1.0
|
||||
* [CB-8943](https://issues.apache.org/jira/browse/CB-8943) fix PickAndContinue issue on Win10Phone
|
||||
* [CB-8253](https://issues.apache.org/jira/browse/CB-8253) Fix potential unreleased resources
|
||||
* [CB-8909](https://issues.apache.org/jira/browse/CB-8909) Remove unused import from File
|
||||
* [CB-8404](https://issues.apache.org/jira/browse/CB-8404) typo fix cameraproxy.js
|
||||
* [CB-8404](https://issues.apache.org/jira/browse/CB-8404) Rotate camera feed with device orientation
|
||||
* [CB-8054](https://issues.apache.org/jira/browse/CB-8054) Support taking pictures from file for WP8
|
||||
* [CB-8405](https://issues.apache.org/jira/browse/CB-8405) Use z-index instead of z-order
|
||||
* [CB-8858](https://issues.apache.org/jira/browse/CB-8858) Incremented plugin version.
|
||||
* [CB-8858](https://issues.apache.org/jira/browse/CB-8858) Updated version in package.json for release 1.0.0
|
||||
* Revert "CB-8858 Incremented plugin version."
|
||||
* [CB-8858](https://issues.apache.org/jira/browse/CB-8858) Incremented plugin version.
|
||||
* [CB-8858](https://issues.apache.org/jira/browse/CB-8858) Updated version and RELEASENOTES.md for release 1.0.0
|
||||
* [CB-8780](https://issues.apache.org/jira/browse/CB-8780) - Display popover using main thread. Fixes popover slowness (closes #81)
|
||||
* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) bumped version of file dependency in package.json too
|
||||
* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) bumped version of file dependency
|
||||
* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) gave plugin major version bump
|
||||
* CR fixes
|
||||
* [CB-8707](https://issues.apache.org/jira/browse/CB-8707) refactoring windows code to improve readability
|
||||
* [CB-8706](https://issues.apache.org/jira/browse/CB-8706) use filePicker if saveToPhotoAlbum is true
|
||||
* [CB-8706](https://issues.apache.org/jira/browse/CB-8706) remove unnecessary capabilities from xml
|
||||
* [CB-8747](https://issues.apache.org/jira/browse/CB-8747) updated dependency, added peer dependency
|
||||
* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) updated blackberry specific references of org.apache.cordova.camera to cordova-plugin-camera
|
||||
* [CB-8782](https://issues.apache.org/jira/browse/CB-8782) Updated the docs to talk about the allowEdit quirks, it's not 100% working, but better than it was
|
||||
* [CB-8782](https://issues.apache.org/jira/browse/CB-8782) Fixed the flow so that we save the cropped image and use it, not the original non-cropped. Crop only supports G+ Photos Crop, other crops may not work, depending on the OEM
|
||||
* [CB-8740](https://issues.apache.org/jira/browse/CB-8740) Removing FileHelper call that was failing on Samsung Galaxy S3, now that we have a real path, we only need to update the MediaStore, not pull from it in this case
|
||||
* [CB-8740](https://issues.apache.org/jira/browse/CB-8740) Partial fix for Save Image to Gallery error found in MobileSpec
|
||||
* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) changed plugin-id to pacakge-name
|
||||
* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) properly updated translated docs to use new id
|
||||
* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) updated translated docs to use new id
|
||||
* [CB-8351](https://issues.apache.org/jira/browse/CB-8351) Fix custom implementation of integerValueForKey (close #79)
|
||||
* Fix cordova-paramedic path change, build with TRAVIS_BUILD_DIR, use npm to install paramedic
|
||||
* docs: added 'Windows' to supported platforms
|
||||
* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) Updated Readme
|
||||
* [CB-8659](https://issues.apache.org/jira/browse/CB-8659) ios: 4.0.x Compatibility: Remove use of deprecated headers
|
||||
* [CB-8646](https://issues.apache.org/jira/browse/CB-8646) Incremented plugin version.
|
||||
* [CB-8646](https://issues.apache.org/jira/browse/CB-8646) Updated version and RELEASENOTES.md for release 0.3.6
|
||||
* added missing apache header
|
||||
* Fix localize key for Videos. This closes #58
|
||||
* [CB-8235](https://issues.apache.org/jira/browse/CB-8235) android: Fix crash when selecting images from DropBox with spaces in path (close #65)
|
||||
* add try ... catch for getting image orientation
|
||||
* [CB-8599](https://issues.apache.org/jira/browse/CB-8599) fix threading issue with cameraPicker (fixes #72)
|
||||
* [CB-8559](https://issues.apache.org/jira/browse/CB-8559) Integrate TravisCI
|
||||
* [CB-8438](https://issues.apache.org/jira/browse/CB-8438) cordova-plugin-camera documentation translation: cordova-plugin-camera
|
||||
* [CB-8538](https://issues.apache.org/jira/browse/CB-8538) Added package.json file
|
||||
* [CB-8429](https://issues.apache.org/jira/browse/CB-8429) Incremented plugin version.
|
||||
* [CB-8429](https://issues.apache.org/jira/browse/CB-8429) Updated version and RELEASENOTES.md for release 0.3.5
|
||||
* [CB-8351](https://issues.apache.org/jira/browse/CB-8351) ios: Stop using now-deprecated [NSData base64EncodedString]
|
||||
* [CB-8351](https://issues.apache.org/jira/browse/CB-8351) ios: Stop using now-deprecated integerValueForKey: class extension
|
||||
* [CB-8351](https://issues.apache.org/jira/browse/CB-8351) Unbreak build from previous commit
|
||||
* [CB-8351](https://issues.apache.org/jira/browse/CB-8351) Use argumentForIndex rather than NSArray extension
|
||||
* [CB-8032](https://issues.apache.org/jira/browse/CB-8032) - Camera Plugin - Add nativeURL external method support for CDVFileSystem->makeEntryForPath:isDirectory: (closes #57)
|
||||
* [CB-7938](https://issues.apache.org/jira/browse/CB-7938) - Added XCTest unit tests project, with stubs (adapted from SplashScreen unit test setup) (closes #60)
|
||||
* [CB-7937](https://issues.apache.org/jira/browse/CB-7937) - Re-factor iOS Camera plugin so that it is testable (closes #52)
|
||||
* [CB-8110](https://issues.apache.org/jira/browse/CB-8110) Incremented plugin version.
|
||||
* [CB-8110](https://issues.apache.org/jira/browse/CB-8110) Updated version and RELEASENOTES.md for release 0.3.4
|
||||
* [CB-7977](https://issues.apache.org/jira/browse/CB-7977) Mention deviceready in plugin docs
|
||||
* [CB-7979](https://issues.apache.org/jira/browse/CB-7979) Each plugin doc should have a ## Installation section
|
||||
* Fix memory leak of image data in imagePickerControllerReturnImageResult
|
||||
* Pass uri to crop instead of pulling the low resolution image out of the intent return (close #43)
|
||||
* Add orientation support for PNG to Android (closes #45)
|
||||
* [CB-7700](https://issues.apache.org/jira/browse/CB-7700) cordova-plugin-camera documentation translation: cordova-plugin-camera
|
||||
* Incremented plugin version.
|
||||
* Updated version and RELEASENOTES.md for release 0.3.3
|
||||
* [CB-7600](https://issues.apache.org/jira/browse/CB-7600) Adds informative message to error callback in manual test.
|
||||
* [CB-7571](https://issues.apache.org/jira/browse/CB-7571) Bump version of nested plugin to match parent plugin
|
||||
* [CB-7571](https://issues.apache.org/jira/browse/CB-7571) Incremented plugin version.
|
||||
* [CB-7571](https://issues.apache.org/jira/browse/CB-7571) Updated version and RELEASENOTES.md for release 0.3.2
|
||||
* [CB-7551](https://issues.apache.org/jira/browse/CB-7551) - [Camera][iOS 8] Scaled images show a white line
|
||||
* [CB-7558](https://issues.apache.org/jira/browse/CB-7558) - hasPendingOperation flag in Camera plugin's takePicture should be reversed to fix memory errors
|
||||
* [CB-7557](https://issues.apache.org/jira/browse/CB-7557) - Camera plugin tests is missing a File dependency
|
||||
* [CB-7423](https://issues.apache.org/jira/browse/CB-7423) do cleanup after copyImage manual test
|
||||
* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-camera documentation translation: cordova-plugin-camera
|
||||
* [CB-7413](https://issues.apache.org/jira/browse/CB-7413) Resolve 'ms-appdata' URIs with File plugin
|
||||
* Fixed minor bugs with the browser
|
||||
* [CB-7433](https://issues.apache.org/jira/browse/CB-7433) Adds missing window reference to prevent manual tests failure on Android and iOS
|
||||
* [CB-7249](https://issues.apache.org/jira/browse/CB-7249) cordova-plugin-camera documentation translation: cordova-plugin-camera
|
||||
* [CB-4003](https://issues.apache.org/jira/browse/CB-4003) - Add config option to not use location information in Camera plugin (and default to not use it)
|
||||
* [CB-7461](https://issues.apache.org/jira/browse/CB-7461) - Geolocation fails in Camera plugin in iOS 8
|
||||
* [CB-7378](https://issues.apache.org/jira/browse/CB-7378) Use single Proxy for both windows8 and windows.
|
||||
* [CB-7378](https://issues.apache.org/jira/browse/CB-7378) Adds support for windows platform
|
||||
* [CB-7433](https://issues.apache.org/jira/browse/CB-7433) Fixes manual tests failure on windows
|
||||
* [CB-6958](https://issues.apache.org/jira/browse/CB-6958) Get the correct default for "quality" in the test
|
||||
* add documentation for manual tests
|
||||
* [CB-7249](https://issues.apache.org/jira/browse/CB-7249) cordova-plugin-camera documentation translation: cordova-plugin-camera
|
||||
* [CB-4003](https://issues.apache.org/jira/browse/CB-4003) - Add config option to not use location information in Camera plugin (and default to not use it)
|
||||
* [CB-7461](https://issues.apache.org/jira/browse/CB-7461) - Geolocation fails in Camera plugin in iOS 8
|
||||
* [CB-7433](https://issues.apache.org/jira/browse/CB-7433) Fixes manual tests failure on windows
|
||||
* [CB-7378](https://issues.apache.org/jira/browse/CB-7378) Use single Proxy for both windows8 and windows.
|
||||
* [CB-7378](https://issues.apache.org/jira/browse/CB-7378) Adds support for windows platform
|
||||
* [CB-6958](https://issues.apache.org/jira/browse/CB-6958) Get the correct default for "quality" in the test
|
||||
* add documentation for manual tests
|
||||
* Updated docs for browser
|
||||
* Added support for the browser
|
||||
* [CB-7286](https://issues.apache.org/jira/browse/CB-7286) [BlackBerry10] Use getUserMedia if camera card is unavailable
|
||||
* [CB-7180](https://issues.apache.org/jira/browse/CB-7180) - Update Camera plugin to support generic plugin webView UIView (which can be either a UIWebView or WKWebView)
|
||||
* Renamed test dir, added nested plugin.xml
|
||||
* [CB-6958](https://issues.apache.org/jira/browse/CB-6958) added manual tests
|
||||
* [CB-6958.](https://issues.apache.org/jira/browse/CB-6958.) Port camera tests to plugin-test-framework
|
||||
* [CB-7244](https://issues.apache.org/jira/browse/CB-7244) Incremented plugin version.
|
||||
* [CB-7244](https://issues.apache.org/jira/browse/CB-7244) Updated version and RELEASENOTES.md for release 0.3.1
|
||||
* CB-7249cordova-plugin-camera documentation translation: cordova-plugin-camera
|
||||
* update CameraProxy.js
|
||||
* [CB-7187](https://issues.apache.org/jira/browse/CB-7187) ios: Add explicit dependency on CoreLocation.framework
|
||||
* CB-7110cordova-plugin-camera documentation translation: cordova-plugin-camera
|
||||
* [BlackBerry10] Doc correction - sourceType is supported
|
||||
* CB-6127lisa7cordova-plugin-consolecordova-plugin-camera documentation translation: cordova-plugin-camera
|
||||
* [CB-7071](https://issues.apache.org/jira/browse/CB-7071) android: Fix callback firing before CROP intent is sent when allowEdit=true
|
||||
* Tweak docs to not use []'s for optional arg since that's JS array notation
|
||||
* [CB-6875](https://issues.apache.org/jira/browse/CB-6875) android: Handle exception when SDCard is not mounted
|
||||
* ios: Delete postImage (dead code)
|
||||
* Prevent NPE on processResiultFromGallery when intent comes null
|
||||
* Remove iOS doc reference to non-existing navigator.fileMgr API
|
||||
* Docs updated with some default values
|
||||
* Removes File plugin dependency from windows8 code.
|
||||
* Use WinJS functionality to resize image instead of File plugin functionality
|
||||
* [CB-6877](https://issues.apache.org/jira/browse/CB-6877) Incremented plugin version.
|
||||
* [CB-6877](https://issues.apache.org/jira/browse/CB-6877) Updated version and RELEASENOTES.md for release 0.3.0
|
||||
* [CB-2083](https://issues.apache.org/jira/browse/CB-2083) documented saveToPhotoAlbum quirk on WP8
|
||||
* [CB-5895](https://issues.apache.org/jira/browse/CB-5895) documented saveToPhotoAlbum quirk on WP8
|
||||
* Remove deprecated symbols for iOS < 6
|
||||
* documentation translation: cordova-plugin-camera
|
||||
* Lisa testing pulling in plugins for plugin: cordova-plugin-camera
|
||||
* Lisa testing pulling in plugins for plugin: cordova-plugin-camera
|
||||
* Lisa testing pulling in plugins for plugin: cordova-plugin-camera
|
||||
* Lisa testing pulling in plugins for plugin: cordova-plugin-camera
|
||||
* ubuntu: use application directory for images
|
||||
* [CB-6795](https://issues.apache.org/jira/browse/CB-6795) Add license
|
||||
* documentation translation: cordova-plugin-camera
|
||||
* Lisa testing pulling in plugins for plugin: cordova-plugin-camera
|
||||
* Lisa testing pulling in plugins for plugin: cordova-plugin-camera
|
||||
* Little fix in code formatting
|
||||
* [CB-6613](https://issues.apache.org/jira/browse/CB-6613) Use WinJS functionality to get base64-encoded content of image instead of File plugin functionality
|
||||
* [CB-6612](https://issues.apache.org/jira/browse/CB-6612) camera.getPicture now always returns encoded JPEG image
|
||||
* Removed invalid note from [CB-5398](https://issues.apache.org/jira/browse/CB-5398)
|
||||
* [CB-6576](https://issues.apache.org/jira/browse/CB-6576) - Returns a specific error message when app has no access to library.
|
||||
* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md
|
||||
* [CB-6546](https://issues.apache.org/jira/browse/CB-6546) android: Fix a couple bugs with allowEdit pull request
|
||||
* [CB-6546](https://issues.apache.org/jira/browse/CB-6546) android: Add support for allowEdit Camera option
|
||||
* [CB-6452](https://issues.apache.org/jira/browse/CB-6452) Incremented plugin version on dev branch.
|
||||
* [CB-6452](https://issues.apache.org/jira/browse/CB-6452) Updated version and RELEASENOTES.md for release 0.2.9
|
||||
* [CB-6460](https://issues.apache.org/jira/browse/CB-6460) Update license headers
|
||||
* [CB-6422](https://issues.apache.org/jira/browse/CB-6422) [windows8] use cordova/exec/proxy
|
||||
* WP8 When only targetWidth or targetHeight is provided, use it as the only bound
|
||||
* Remove rotation test value
|
||||
* cleanup, finalize implementations/consolidations
|
||||
* combining callbacks, removing lots of dupe code
|
||||
* Fix camera issues, cropping, memory leaks CB-4027, CB-5102, CB-2737, [CB-2387](https://issues.apache.org/jira/browse/CB-2387)
|
||||
* [CB-6212](https://issues.apache.org/jira/browse/CB-6212) iOS: fix warnings compiled under arm64 64-bit
|
||||
* Fix typo error in docs
|
||||
* [CB-6212](https://issues.apache.org/jira/browse/CB-6212) iOS: fix warnings compiled under arm64 64-bit
|
||||
* Add rim xml namespaces declaration
|
||||
* Add NOTICE file
|
||||
* [CB-6114](https://issues.apache.org/jira/browse/CB-6114) Incremented plugin version on dev branch.
|
||||
* [CB-6114](https://issues.apache.org/jira/browse/CB-6114) Updated version and RELEASENOTES.md for release 0.2.8
|
||||
* Add NOTICE file
|
||||
* [CB-6114](https://issues.apache.org/jira/browse/CB-6114) Updated version and RELEASENOTES.md for release 0.2.8
|
||||
* [CB-1826](https://issues.apache.org/jira/browse/CB-1826) Android: Guard against content provider not supplying orientation
|
||||
* [CB-1826](https://issues.apache.org/jira/browse/CB-1826) Catch OOM on gallery image resize
|
||||
* Refactor onActivityResult
|
||||
* [CB-5980](https://issues.apache.org/jira/browse/CB-5980) Incremented plugin version on dev branch.
|
||||
* Lisa testing pulling in plugins for plugin: cordova-plugin-camera
|
||||
* Lisa testing pulling in plugins for plugin: cordova-plugin-camera
|
||||
* [CB-5980](https://issues.apache.org/jira/browse/CB-5980) Updated version and RELEASENOTES.md for release 0.2.7
|
||||
* remove unrequired FFOS file
|
||||
* reapply new version of FFOS config in plugin.xml
|
||||
* remove 2nd FFOS platform config in plugin.xml
|
||||
* typo
|
||||
* [CB-4919](https://issues.apache.org/jira/browse/CB-4919) firefox os quirks added and supported platforms list is updated
|
||||
* getPicture via web activities
|
||||
* Documented quirk for [CB-5335](https://issues.apache.org/jira/browse/CB-5335) + [CB-5206](https://issues.apache.org/jira/browse/CB-5206) for WP7+8
|
||||
* reference the correct firefoxos implementation
|
||||
* Delete stale test/ directory
|
||||
* [BlackBerry10] Add permission to access_shared
|
||||
* [CB-5719](https://issues.apache.org/jira/browse/CB-5719) Incremented plugin version on dev branch.
|
||||
* Documented quirk for [CB-5335](https://issues.apache.org/jira/browse/CB-5335) + [CB-5206](https://issues.apache.org/jira/browse/CB-5206) for WP7+8
|
||||
* [CB-5719](https://issues.apache.org/jira/browse/CB-5719) Updated version and RELEASENOTES.md for release 0.2.6
|
||||
* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Update license comment formatting of doc/index.md
|
||||
* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Add doc.index.md for Camera plugin
|
||||
* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Delete stale snapshot of plugin docs
|
||||
* [CB-2442](https://issues.apache.org/jira/browse/CB-2442) [CB-2419](https://issues.apache.org/jira/browse/CB-2419) Use Windows.Storage.ApplicationData.current.localFolder, instead of writing to app package.
|
||||
* [BlackBerry10] Adding platform level permissions
|
||||
* [CB-5599](https://issues.apache.org/jira/browse/CB-5599) Android: Catch and ignore OutOfMemoryError in getRotatedBitmap()
|
||||
* [CB-5565](https://issues.apache.org/jira/browse/CB-5565) Incremented plugin version on dev branch.
|
||||
* [CB-5565](https://issues.apache.org/jira/browse/CB-5565) Updated version and RELEASENOTES.md for release 0.2.5
|
||||
* fix camera for firefox os
|
||||
* getPicture via web activities
|
||||
* [ubuntu] specify policy_group
|
||||
* add ubuntu platform
|
||||
* 1. User Agent detection now detects AmazonWebView. 2. Change to use amazon-fireos as the platform if user agent string contains 'cordova-amazon-fireos'
|
||||
* Added amazon-fireos platform.
|
||||
* [CB-5188](https://issues.apache.org/jira/browse/CB-5188)
|
||||
* [CB-5188](https://issues.apache.org/jira/browse/CB-5188) Updated version and RELEASENOTES.md for release 0.2.4
|
||||
* [CB-5128](https://issues.apache.org/jira/browse/CB-5128) added repo + issue tag to plugin.xml for camera plugin
|
||||
* [CB-4958](https://issues.apache.org/jira/browse/CB-4958) - iOS - Camera plugin should not show the status bar
|
||||
* [CB-4919](https://issues.apache.org/jira/browse/CB-4919) updated plugin.xml for FxOS
|
||||
* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Incremented plugin version on dev branch.
|
||||
* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Updated version and RELEASENOTES.md for release 0.2.3
|
||||
* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) bumping&resetting version
|
||||
* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) forgot index.html
|
||||
* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming core inside cameraProxy
|
||||
* [Windows8] commandProxy has moved
|
||||
* [Windows8] commandProxy has moved
|
||||
* added Camera API for FirefoxOS
|
||||
* Rename CHANGELOG.md -> RELEASENOTES.md
|
||||
* [CB-4823](https://issues.apache.org/jira/browse/CB-4823) Fix XCode 5 camera plugin warnings
|
||||
* Fix compiler warnings
|
||||
* [CB-4765](https://issues.apache.org/jira/browse/CB-4765) Move ExifHelper.java into Camera Plugin
|
||||
* [CB-4764](https://issues.apache.org/jira/browse/CB-4764) Remove reference to DirectoryManager from CameraLauncher
|
||||
* [CB-4763](https://issues.apache.org/jira/browse/CB-4763) Use a copy of FileHelper.java within camera-plugin.
|
||||
* [CB-4752](https://issues.apache.org/jira/browse/CB-4752) Incremented plugin version on dev branch.
|
||||
* [CB-4633](https://issues.apache.org/jira/browse/CB-4633) We really should close cursors. It's just the right thing to do.
|
||||
* No longer causes a stack trace, but it doesn't cause the error to be called.
|
||||
* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming org.apache.cordova.core.camera to org.apache.cordova.camera
|
||||
* No longer causes a stack trace, but it doesn't cause the error to be called.
|
||||
* [CB-4432](https://issues.apache.org/jira/browse/CB-4432) copyright notice change
|
||||
* [CB-4752](https://issues.apache.org/jira/browse/CB-4752) Updated version and changelog
|
||||
* [CB-4656](https://issues.apache.org/jira/browse/CB-4656) Don't add line-breaks to base64-encoded images.
|
||||
* [CB-4432](https://issues.apache.org/jira/browse/CB-4432) copyright notice change
|
||||
* [CB-4595](https://issues.apache.org/jira/browse/CB-4595) updated version
|
||||
* reverted name element to be human readable
|
||||
* [CB-4417](https://issues.apache.org/jira/browse/CB-4417) Move cordova-plugin-camera to its own Java package.
|
||||
* updated namespace, name tag and readme
|
||||
* cleanup whitespace
|
||||
* [CB-3482](https://issues.apache.org/jira/browse/CB-3482) Allow image metadata to be saved to album on iOS
|
||||
* [CB-3453](https://issues.apache.org/jira/browse/CB-3453) Save original picture to photo library
|
||||
* [CB-3482](https://issues.apache.org/jira/browse/CB-3482) Allow image metadata to be saved to album on iOS
|
||||
* [CB-3453](https://issues.apache.org/jira/browse/CB-3453) Save original picture to photo library
|
||||
* [plugin.xml] adding android namespace
|
||||
* [plugin.xml] standardizing license + meta
|
||||
* [license] adding apache license file
|
||||
* updating plugin.xml with registry data
|
||||
* [Windows8] added support for Windows8
|
||||
* [CB-4366](https://issues.apache.org/jira/browse/CB-4366) Explicit MobileCoreServices.framework dependency should be specified for some core plugins
|
||||
* [CB-4367](https://issues.apache.org/jira/browse/CB-4367) Explicit AssetsLibrary.framework dependency should be specified for some core plugins
|
||||
* [CB-4368](https://issues.apache.org/jira/browse/CB-4368) Explicit CoreGraphics.framework dependency should be specified for some core plugins
|
||||
* [CB-4365](https://issues.apache.org/jira/browse/CB-4365) Explicit CoreLocation.framework dependency should be specified for some core plugins
|
||||
* [CB-4361](https://issues.apache.org/jira/browse/CB-4361) Camera plugin needs to specify ImageIO.framework dependency in plugin.xml
|
||||
* [wp] capabilities fix, access to mediaLib for saving photos
|
||||
|
||||
### 2.3.0 (Sep 08, 2016)
|
||||
* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies
|
||||
|
||||
@@ -21,10 +21,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
// these tests are meant to be executed by Cordova Medic Appium runner
|
||||
// you can find it here: https://github.com/apache/cordova-medic/
|
||||
// these tests are meant to be executed by Cordova ParaMedic Appium runner
|
||||
// you can find it here: https://github.com/apache/cordova-paramedic/
|
||||
// it is not necessary to do a full CI setup to run these tests
|
||||
// just run "node cordova-medic/medic/medic.js appium --platform android --plugins cordova-plugin-camera"
|
||||
// Run:
|
||||
// node cordova-paramedic/main.js --platform android --plugin cordova-plugin-camera --skipMainTests --target <emulator name>
|
||||
// Please note only Android 5.1 and 4.4 are supported at this point.
|
||||
|
||||
'use strict';
|
||||
|
||||
@@ -40,6 +42,7 @@ var DEFAULT_SCREEN_WIDTH = 360;
|
||||
var DEFAULT_SCREEN_HEIGHT = 567;
|
||||
var DEFAULT_WEBVIEW_CONTEXT = 'WEBVIEW';
|
||||
var PROMISE_PREFIX = 'appium_camera_promise_';
|
||||
var CONTEXT_NATIVE_APP = 'NATIVE_APP';
|
||||
|
||||
describe('Camera tests Android.', function () {
|
||||
var driver;
|
||||
@@ -56,6 +59,8 @@ describe('Camera tests Android.', function () {
|
||||
var appiumSessionStarted = false;
|
||||
// determine if camera is present on the device/emulator
|
||||
var cameraAvailable = false;
|
||||
// determine if emulator is within a range of acceptable resolutions able to run these tests
|
||||
var isResolutionBad = true;
|
||||
// a path to the image we add to the gallery before test run
|
||||
var fillerImagePath;
|
||||
|
||||
@@ -68,10 +73,9 @@ describe('Camera tests Android.', function () {
|
||||
return PROMISE_PREFIX + promiseCount;
|
||||
}
|
||||
|
||||
function saveScreenshotAndFail(error) {
|
||||
function gracefullyFail(error) {
|
||||
fail(error);
|
||||
return screenshotHelper
|
||||
.saveScreenshot(driver)
|
||||
return driver
|
||||
.quit()
|
||||
.then(function () {
|
||||
return getDriver();
|
||||
@@ -104,7 +108,7 @@ describe('Camera tests Android.', function () {
|
||||
return driver
|
||||
.context(webviewContext)
|
||||
.execute(cameraHelper.getPicture, [options, promiseId])
|
||||
.context('NATIVE_APP')
|
||||
.context(CONTEXT_NATIVE_APP)
|
||||
.then(function () {
|
||||
if (skipUiInteractions) {
|
||||
return;
|
||||
@@ -121,7 +125,7 @@ describe('Camera tests Android.', function () {
|
||||
y: Math.round(screenHeight / 4)
|
||||
});
|
||||
swipeRight
|
||||
.press({x: 10, y: 150})
|
||||
.press({x: 10, y: Math.round(screenHeight / 4)})
|
||||
.wait(300)
|
||||
.moveTo({x: Math.round(screenWidth - (screenWidth / 8)), y: 0})
|
||||
.wait(1500)
|
||||
@@ -134,19 +138,12 @@ describe('Camera tests Android.', function () {
|
||||
.performTouchAction(tapTile);
|
||||
}
|
||||
return driver
|
||||
.waitForElementByXPath('//android.widget.TextView[@text="Gallery"]', 20000)
|
||||
.elementByXPath('//android.widget.TextView[@text="Gallery"]')
|
||||
.elementByXPath('//android.widget.TextView[@text="Gallery"]')
|
||||
.elementByXPath('//android.widget.TextView[@text="Gallery"]')
|
||||
.elementByXPath('//android.widget.TextView[@text="Gallery"]')
|
||||
.waitForElementByAndroidUIAutomator('new UiSelector().text("Gallery");', 20000)
|
||||
.fail(function () {
|
||||
// If the Gallery button is not present, swipe right to reveal the Gallery button!
|
||||
return driver
|
||||
.performTouchAction(swipeRight)
|
||||
.waitForElementByXPath('//android.widget.TextView[@text="Gallery"]', 20000)
|
||||
.elementByXPath('//android.widget.TextView[@text="Gallery"]')
|
||||
.elementByXPath('//android.widget.TextView[@text="Gallery"]')
|
||||
.elementByXPath('//android.widget.TextView[@text="Gallery"]')
|
||||
.elementByXPath('//android.widget.TextView[@text="Gallery"]');
|
||||
.waitForElementByAndroidUIAutomator('new UiSelector().text("Gallery");', 20000)
|
||||
})
|
||||
.click()
|
||||
// always wait before performing touchAction
|
||||
@@ -155,13 +152,9 @@ describe('Camera tests Android.', function () {
|
||||
}
|
||||
// taking a picture from camera
|
||||
return driver
|
||||
.waitForElementByXPath('//android.widget.ImageView[contains(@resource-id,\'shutter\')]', MINUTE / 2)
|
||||
.elementByXPath('//android.widget.ImageView[contains(@resource-id,\'shutter\')]')
|
||||
.elementByXPath('//android.widget.ImageView[contains(@resource-id,\'shutter\')]')
|
||||
.waitForElementByAndroidUIAutomator('new UiSelector().resourceIdMatches(".*shutter.*")', MINUTE / 2)
|
||||
.click()
|
||||
.waitForElementByXPath('//android.widget.ImageView[contains(@resource-id,\'done\')]', MINUTE / 2)
|
||||
.elementByXPath('//android.widget.ImageView[contains(@resource-id,\'done\')]')
|
||||
.elementByXPath('//android.widget.ImageView[contains(@resource-id,\'done\')]')
|
||||
.waitForElementByAndroidUIAutomator('new UiSelector().resourceIdMatches(".*done.*")', MINUTE / 2)
|
||||
.click();
|
||||
})
|
||||
.then(function () {
|
||||
@@ -170,7 +163,7 @@ describe('Camera tests Android.', function () {
|
||||
}
|
||||
if (options.allowEdit) {
|
||||
return driver
|
||||
.waitForElementByXPath('//*[contains(@resource-id,\'save\')]', MINUTE)
|
||||
.waitForElementByAndroidUIAutomator('new UiSelector().text("Save")', MINUTE)
|
||||
.click();
|
||||
}
|
||||
})
|
||||
@@ -203,16 +196,19 @@ describe('Camera tests Android.', function () {
|
||||
// deletes the latest image from the gallery
|
||||
function deleteImage() {
|
||||
var holdTile = new wd.TouchAction();
|
||||
holdTile.press({x: Math.round(screenWidth / 4), y: Math.round(screenHeight / 5)}).wait(1000).release();
|
||||
holdTile
|
||||
.press({x: Math.round(screenWidth / 4), y: Math.round(screenHeight / 5)})
|
||||
.wait(1000)
|
||||
.release();
|
||||
return driver
|
||||
// always wait before performing touchAction
|
||||
.sleep(7000)
|
||||
.performTouchAction(holdTile)
|
||||
.elementByXPath('//android.widget.TextView[@text="Delete"]')
|
||||
.elementByAndroidUIAutomator('new UiSelector().text("Delete")')
|
||||
.then(function (element) {
|
||||
return element
|
||||
.click()
|
||||
.elementByXPath('//android.widget.Button[@text="OK"]')
|
||||
.elementByAndroidUIAutomator('new UiSelector().text("OK")')
|
||||
.click();
|
||||
}, function () {
|
||||
// couldn't find Delete menu item. Possibly there is no image.
|
||||
@@ -229,6 +225,40 @@ describe('Camera tests Android.', function () {
|
||||
})
|
||||
.waitForDeviceReady()
|
||||
.injectLibraries()
|
||||
.then(function () {
|
||||
var options = {
|
||||
quality: 50,
|
||||
allowEdit: false,
|
||||
sourceType: cameraConstants.PictureSourceType.SAVEDPHOTOALBUM,
|
||||
saveToPhotoAlbum: false,
|
||||
targetWidth: 210,
|
||||
targetHeight: 210
|
||||
};
|
||||
return driver
|
||||
.then(function () { return getPicture(options, true); })
|
||||
.context(CONTEXT_NATIVE_APP)
|
||||
// case insensitive select, will be handy with Android 7 support
|
||||
.elementByXPath('//android.widget.Button[translate(@text, "alow", "ALOW")="ALLOW"]')
|
||||
.click()
|
||||
.fail(function noAlert() { })
|
||||
.deviceKeyEvent(BACK_BUTTON)
|
||||
.sleep(2000)
|
||||
.elementById('action_bar_title')
|
||||
.then(function () {
|
||||
// success means we're still in native app
|
||||
return driver
|
||||
.deviceKeyEvent(BACK_BUTTON);
|
||||
}, function () {
|
||||
// error means we're already in webview
|
||||
return driver;
|
||||
});
|
||||
})
|
||||
.then(function () {
|
||||
// doing it inside a function because otherwise
|
||||
// it would not hook up to the webviewContext var change
|
||||
// in the first methods of this chain
|
||||
return driver.context(webviewContext);
|
||||
})
|
||||
.deleteFillerImage(fillerImagePath)
|
||||
.then(function () {
|
||||
fillerImagePath = null;
|
||||
@@ -262,7 +292,7 @@ describe('Camera tests Android.', function () {
|
||||
.then(spec);
|
||||
});
|
||||
})
|
||||
.fail(saveScreenshotAndFail);
|
||||
.fail(gracefullyFail);
|
||||
}
|
||||
|
||||
// produces a generic spec function which
|
||||
@@ -280,19 +310,29 @@ describe('Camera tests Android.', function () {
|
||||
};
|
||||
}
|
||||
|
||||
function checkSession(done) {
|
||||
function checkSession(done, skipResolutionCheck) {
|
||||
if (!appiumSessionStarted) {
|
||||
fail('Failed to start a session');
|
||||
fail('Failed to start a session ' + (lastFailureReason ? lastFailureReason : ''));
|
||||
done();
|
||||
}
|
||||
if (!skipResolutionCheck && isResolutionBad) {
|
||||
fail('The resolution of this target device is not within the appropriate range of width: blah-blah and height: bleh-bleh. The target\'s current resolution is: ' + isResolutionBad);
|
||||
}
|
||||
}
|
||||
|
||||
function checkCamera(pending) {
|
||||
if (!cameraAvailable) {
|
||||
pending('This test requires camera');
|
||||
pending('This test requires a functioning camera on the Android device/emulator, and this test suite\'s functional camera test failed on your target environment.');
|
||||
}
|
||||
}
|
||||
|
||||
afterAll(function (done) {
|
||||
checkSession(done);
|
||||
driver
|
||||
.quit()
|
||||
.done(done);
|
||||
}, MINUTE);
|
||||
|
||||
it('camera.ui.util configuring driver and starting a session', function (done) {
|
||||
getDriver()
|
||||
.then(function () {
|
||||
@@ -302,18 +342,19 @@ describe('Camera tests Android.', function () {
|
||||
}, 10 * MINUTE);
|
||||
|
||||
it('camera.ui.util determine screen dimensions', function (done) {
|
||||
checkSession(done);
|
||||
checkSession(done, /*skipResolutionCheck?*/ true); // skip the resolution check here since we are about to find out in this spec!
|
||||
driver
|
||||
.context(webviewContext)
|
||||
.execute(function () {
|
||||
return {
|
||||
'width': screen.availWidth,
|
||||
'height': screen.availHeight
|
||||
};
|
||||
}, [])
|
||||
.context(CONTEXT_NATIVE_APP)
|
||||
.getWindowSize()
|
||||
.then(function (size) {
|
||||
screenWidth = Number(size.width);
|
||||
screenHeight = Number(size.height);
|
||||
isResolutionBad = false;
|
||||
/*
|
||||
TODO: what are acceptable resolution values?
|
||||
need to check what the emulators used in CI return.
|
||||
and also what local device definitions work and dont
|
||||
*/
|
||||
})
|
||||
.done(done);
|
||||
}, MINUTE);
|
||||
@@ -366,14 +407,12 @@ describe('Camera tests Android.', function () {
|
||||
.then(function () {
|
||||
return getPicture(options, true);
|
||||
})
|
||||
.context('NATIVE_APP')
|
||||
.context(CONTEXT_NATIVE_APP)
|
||||
.then(function () {
|
||||
// try to find "Gallery" menu item
|
||||
// if there's none, the gallery should be already opened
|
||||
return driver
|
||||
.waitForElementByXPath('//android.widget.TextView[@text="Gallery"]', 20000)
|
||||
.elementByXPath('//android.widget.TextView[@text="Gallery"]')
|
||||
.elementByXPath('//android.widget.TextView[@text="Gallery"]')
|
||||
.waitForElementByAndroidUIAutomator('new UiSelector().text("Gallery")', 20000)
|
||||
.then(function (element) {
|
||||
return element.click();
|
||||
}, function () {
|
||||
@@ -384,13 +423,13 @@ describe('Camera tests Android.', function () {
|
||||
// if the gallery is opened on the videos page,
|
||||
// there should be a "Choose video" caption
|
||||
return driver
|
||||
.elementByXPath('//*[@text="Choose video"]')
|
||||
.elementByAndroidUIAutomator('new UiSelector().text("Choose video")')
|
||||
.fail(function () {
|
||||
throw 'Couldn\'t find "Choose video" element.';
|
||||
throw 'Couldn\'t find a "Choose video" element.';
|
||||
});
|
||||
})
|
||||
.deviceKeyEvent(BACK_BUTTON)
|
||||
.elementByXPath('//android.widget.TextView[@text="Gallery"]')
|
||||
.elementByAndroidUIAutomator('new UiSelector().text("Gallery")')
|
||||
.deviceKeyEvent(BACK_BUTTON)
|
||||
.finally(function () {
|
||||
return driver
|
||||
@@ -437,10 +476,8 @@ describe('Camera tests Android.', function () {
|
||||
.then(function () {
|
||||
return getPicture(options, true);
|
||||
})
|
||||
.context("NATIVE_APP")
|
||||
.waitForElementByXPath('//android.widget.ImageView[contains(@resource-id,\'cancel\')]', MINUTE / 2)
|
||||
.elementByXPath('//android.widget.ImageView[contains(@resource-id,\'cancel\')]')
|
||||
.elementByXPath('//android.widget.ImageView[contains(@resource-id,\'cancel\')]')
|
||||
.context(CONTEXT_NATIVE_APP)
|
||||
.waitForElementByAndroidUIAutomator('new UiSelector().resourceIdMatches(".*cancel.*")', MINUTE / 2)
|
||||
.click()
|
||||
.then(function () {
|
||||
return checkPicture(false);
|
||||
@@ -466,18 +503,11 @@ describe('Camera tests Android.', function () {
|
||||
.then(function () {
|
||||
return getPicture(options, true);
|
||||
})
|
||||
.context('NATIVE_APP')
|
||||
.waitForElementByXPath('//android.widget.ImageView[contains(@resource-id,\'shutter\')]', MINUTE / 2)
|
||||
.elementByXPath('//android.widget.ImageView[contains(@resource-id,\'shutter\')]')
|
||||
.elementByXPath('//android.widget.ImageView[contains(@resource-id,\'shutter\')]')
|
||||
.waitForElementByAndroidUIAutomator('new UiSelector().resourceIdMatches(".*shutter.*")', MINUTE / 2)
|
||||
.click()
|
||||
.waitForElementByXPath('//android.widget.ImageView[contains(@resource-id,\'done\')]', MINUTE / 2)
|
||||
.elementByXPath('//android.widget.ImageView[contains(@resource-id,\'done\')]')
|
||||
.elementByXPath('//android.widget.ImageView[contains(@resource-id,\'done\')]')
|
||||
.waitForElementByAndroidUIAutomator('new UiSelector().resourceIdMatches(".*done.*")', MINUTE / 2)
|
||||
.click()
|
||||
.waitForElementByXPath('//*[contains(@resource-id,\'discard\')]', MINUTE / 2)
|
||||
.elementByXPath('//*[contains(@resource-id,\'discard\')]')
|
||||
.elementByXPath('//*[contains(@resource-id,\'discard\')]')
|
||||
.waitForElementByAndroidUIAutomator('new UiSelector().resourceIdMatches(".*discard.*")', MINUTE / 2)
|
||||
.click()
|
||||
.then(function () {
|
||||
return checkPicture(false);
|
||||
@@ -607,7 +637,7 @@ describe('Camera tests Android.', function () {
|
||||
// delete exactly one latest picture
|
||||
// this should be the picture we've taken in the first spec
|
||||
driver
|
||||
.context('NATIVE_APP')
|
||||
.context(CONTEXT_NATIVE_APP)
|
||||
.deviceKeyEvent(BACK_BUTTON)
|
||||
.sleep(1000)
|
||||
.deviceKeyEvent(BACK_BUTTON)
|
||||
@@ -615,9 +645,18 @@ describe('Camera tests Android.', function () {
|
||||
.deviceKeyEvent(BACK_BUTTON)
|
||||
.elementById('Apps')
|
||||
.click()
|
||||
.elementByXPath('//android.widget.TextView[@text="Gallery"]')
|
||||
.then(function () {
|
||||
return driver
|
||||
.elementByXPath('//android.widget.Button[@text="OK"]')
|
||||
.click()
|
||||
.fail(function () {
|
||||
// no cling is all right
|
||||
// it is not a brand new emulator, then
|
||||
});
|
||||
})
|
||||
.elementByAndroidUIAutomator('new UiSelector().text("Gallery")')
|
||||
.click()
|
||||
.elementByXPath('//android.widget.TextView[contains(@text,"Pictures")]')
|
||||
.elementByAndroidUIAutomator('new UiSelector().textContains("Pictures")')
|
||||
.click()
|
||||
.then(deleteImage)
|
||||
.deviceKeyEvent(BACK_BUTTON)
|
||||
@@ -630,10 +669,4 @@ describe('Camera tests Android.', function () {
|
||||
}, 3 * MINUTE);
|
||||
});
|
||||
|
||||
it('camera.ui.util Destroy the session', function (done) {
|
||||
checkSession(done);
|
||||
driver
|
||||
.quit()
|
||||
.done(done);
|
||||
}, 5 * MINUTE);
|
||||
});
|
||||
|
||||
@@ -169,6 +169,7 @@ module.exports.checkPicture = function (pid, options, cb) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
if (result.indexOf('file:') === 0 ||
|
||||
result.indexOf('content:') === 0 ||
|
||||
@@ -184,6 +185,8 @@ module.exports.checkPicture = function (pid, options, cb) {
|
||||
} else {
|
||||
verifyFile(entry);
|
||||
}
|
||||
}, function (err) {
|
||||
errorCallback(err);
|
||||
});
|
||||
} else {
|
||||
displayImage(result);
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
// these tests are meant to be executed by Cordova Medic Appium runner
|
||||
// you can find it here: https://github.com/apache/cordova-medic/
|
||||
// these tests are meant to be executed by Cordova Paramedic test runner
|
||||
// you can find it here: https://github.com/apache/cordova-paramedic/
|
||||
// it is not necessary to do a full CI setup to run these tests
|
||||
// just run "node cordova-medic/medic/medic.js appium --platform android --plugins cordova-plugin-camera"
|
||||
// just run "node cordova-paramedic/main.js --platform ios --plugin cordova-plugin-camera"
|
||||
|
||||
'use strict';
|
||||
|
||||
@@ -37,6 +37,7 @@ var cameraHelper = require('../helpers/cameraHelper');
|
||||
var MINUTE = 60 * 1000;
|
||||
var DEFAULT_WEBVIEW_CONTEXT = 'WEBVIEW_1';
|
||||
var PROMISE_PREFIX = 'appium_camera_promise_';
|
||||
var CONTEXT_NATIVE_APP = 'NATIVE_APP';
|
||||
|
||||
describe('Camera tests iOS.', function () {
|
||||
var driver;
|
||||
@@ -45,6 +46,10 @@ describe('Camera tests iOS.', function () {
|
||||
var promiseCount = 0;
|
||||
// going to set this to false if session is created successfully
|
||||
var failedToStart = true;
|
||||
// points out which UI automation to use
|
||||
var isXCUI = false;
|
||||
// spec counter to restart the session
|
||||
var specsRun = 0;
|
||||
|
||||
function getNextPromiseId() {
|
||||
promiseCount += 1;
|
||||
@@ -55,10 +60,9 @@ describe('Camera tests iOS.', function () {
|
||||
return PROMISE_PREFIX + promiseCount;
|
||||
}
|
||||
|
||||
function saveScreenshotAndFail(error) {
|
||||
function gracefullyFail(error) {
|
||||
fail(error);
|
||||
return screenshotHelper
|
||||
.saveScreenshot(driver)
|
||||
return driver
|
||||
.quit()
|
||||
.then(function () {
|
||||
return getDriver();
|
||||
@@ -82,11 +86,43 @@ describe('Camera tests iOS.', function () {
|
||||
.elementByXPath('//*[@label="Use"]')
|
||||
.click()
|
||||
.fail(function () {
|
||||
// For some reason "Choose" element is not clickable by standard Appium methods
|
||||
if (isXCUI) {
|
||||
return driver
|
||||
.waitForElementByAccessibilityId('Choose', MINUTE / 3)
|
||||
.click();
|
||||
}
|
||||
// For some reason "Choose" element is not clickable by standard Appium methods on iOS <= 9
|
||||
return wdHelper.tapElementByXPath('//UIAButton[@label="Choose"]', driver);
|
||||
});
|
||||
}
|
||||
|
||||
function clickPhoto() {
|
||||
if (isXCUI) {
|
||||
// iOS >=10
|
||||
return driver
|
||||
.context(CONTEXT_NATIVE_APP)
|
||||
.elementsByXPath('//XCUIElementTypeCell')
|
||||
.then(function(photos) {
|
||||
if (photos.length == 0) {
|
||||
return driver
|
||||
.sleep(0) // driver.source is not a function o.O
|
||||
.source()
|
||||
.then(function (src) {
|
||||
console.log(src);
|
||||
gracefullyFail('Couldn\'t find an image to click');
|
||||
});
|
||||
}
|
||||
// intentionally clicking the second photo here
|
||||
// the first one is not clickable for some reason
|
||||
return photos[1].click();
|
||||
});
|
||||
}
|
||||
// iOS <10
|
||||
return driver
|
||||
.elementByXPath('//UIACollectionCell')
|
||||
.click();
|
||||
}
|
||||
|
||||
function getPicture(options, cancelCamera, skipUiInteractions) {
|
||||
var promiseId = getNextPromiseId();
|
||||
if (!options) {
|
||||
@@ -96,17 +132,18 @@ describe('Camera tests iOS.', function () {
|
||||
return driver
|
||||
.context(webviewContext)
|
||||
.execute(cameraHelper.getPicture, [options, promiseId])
|
||||
.context('NATIVE_APP')
|
||||
.context(CONTEXT_NATIVE_APP)
|
||||
.then(function () {
|
||||
if (skipUiInteractions) {
|
||||
return;
|
||||
}
|
||||
if (options.hasOwnProperty('sourceType') && options.sourceType === cameraConstants.PictureSourceType.PHOTOLIBRARY) {
|
||||
return driver
|
||||
.waitForElementByXPath('//*[@label="Camera Roll"]', MINUTE / 2)
|
||||
.click()
|
||||
.elementByXPath('//UIACollectionCell')
|
||||
.waitForElementByAccessibilityId('Camera Roll', MINUTE / 2)
|
||||
.click()
|
||||
.then(function () {
|
||||
return clickPhoto();
|
||||
})
|
||||
.then(function () {
|
||||
if (!options.allowEdit) {
|
||||
return driver;
|
||||
@@ -115,9 +152,7 @@ describe('Camera tests iOS.', function () {
|
||||
});
|
||||
}
|
||||
if (options.hasOwnProperty('sourceType') && options.sourceType === cameraConstants.PictureSourceType.SAVEDPHOTOALBUM) {
|
||||
return driver
|
||||
.waitForElementByXPath('//UIACollectionCell', MINUTE / 2)
|
||||
.click()
|
||||
return clickPhoto()
|
||||
.then(function () {
|
||||
if (!options.allowEdit) {
|
||||
return driver;
|
||||
@@ -127,15 +162,13 @@ describe('Camera tests iOS.', function () {
|
||||
}
|
||||
if (cancelCamera) {
|
||||
return driver
|
||||
.waitForElementByXPath('//*[@label="Cancel"]', MINUTE / 2)
|
||||
.elementByXPath('//*[@label="Cancel"]')
|
||||
.elementByXPath('//*[@label="Cancel"]')
|
||||
.waitForElementByAccessibilityId('Cancel', MINUTE / 2)
|
||||
.click();
|
||||
}
|
||||
return driver
|
||||
.waitForElementByXPath('//*[@label="Take Picture"]', MINUTE / 2)
|
||||
.waitForElementByAccessibilityId('Take Picture', MINUTE / 2)
|
||||
.click()
|
||||
.waitForElementByXPath('//*[@label="Use Photo"]', MINUTE / 2)
|
||||
.waitForElementByAccessibilityId('Use Photo', MINUTE / 2)
|
||||
.click();
|
||||
})
|
||||
.fail(fail);
|
||||
@@ -164,7 +197,12 @@ describe('Camera tests iOS.', function () {
|
||||
|
||||
// takes a picture with the specified options
|
||||
// and then verifies it
|
||||
function runSpec(options) {
|
||||
function runSpec(options, done, pending) {
|
||||
if (options.sourceType === cameraConstants.PictureSourceType.CAMERA && !isDevice) {
|
||||
pending('Camera is not available on iOS simulator');
|
||||
}
|
||||
checkSession(done);
|
||||
specsRun += 1;
|
||||
return driver
|
||||
.then(function () {
|
||||
return getPicture(options);
|
||||
@@ -172,10 +210,11 @@ describe('Camera tests iOS.', function () {
|
||||
.then(function () {
|
||||
return checkPicture(true, options);
|
||||
})
|
||||
.fail(saveScreenshotAndFail);
|
||||
.fail(gracefullyFail);
|
||||
}
|
||||
|
||||
function getDriver() {
|
||||
failedToStart = true;
|
||||
driver = wdHelper.getDriver('iOS');
|
||||
return wdHelper.getWebviewContext(driver)
|
||||
.then(function(context) {
|
||||
@@ -187,6 +226,42 @@ describe('Camera tests iOS.', function () {
|
||||
})
|
||||
.then(function () {
|
||||
return wdHelper.injectLibraries(driver);
|
||||
})
|
||||
.sessionCapabilities()
|
||||
.then(function (caps) {
|
||||
var platformVersion = parseFloat(caps.platformVersion);
|
||||
isXCUI = platformVersion >= 10.0;
|
||||
})
|
||||
.then(function () {
|
||||
var options = {
|
||||
quality: 50,
|
||||
allowEdit: false,
|
||||
sourceType: cameraConstants.PictureSourceType.SAVEDPHOTOALBUM,
|
||||
saveToPhotoAlbum: false,
|
||||
targetWidth: 210,
|
||||
targetHeight: 210
|
||||
};
|
||||
return driver
|
||||
.then(function () { return getPicture(options, false, true); })
|
||||
.context(CONTEXT_NATIVE_APP)
|
||||
.acceptAlert()
|
||||
.then(function alertDismissed() {
|
||||
// TODO: once we move to only XCUITest-based (which is force on you in either iOS 10+ or Xcode 8+)
|
||||
// UI tests, we will have to:
|
||||
// a) remove use of autoAcceptAlerts appium capability since it no longer functions in XCUITest
|
||||
// b) can remove this entire then() clause, as we do not need to explicitly handle the acceptAlert
|
||||
// failure callback, since we will be guaranteed to hit the permission dialog on startup.
|
||||
}, function noAlert() {
|
||||
// in case the contacts permission alert never showed up: no problem, don't freak out.
|
||||
// This can happen if:
|
||||
// a) The application-under-test already had photos permissions granted to it
|
||||
// b) Appium's autoAcceptAlerts capability is provided (and functioning)
|
||||
})
|
||||
.elementByAccessibilityId('Cancel', 10000)
|
||||
.click();
|
||||
})
|
||||
.then(function () {
|
||||
failedToStart = false;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -199,27 +274,46 @@ describe('Camera tests iOS.', function () {
|
||||
|
||||
it('camera.ui.util configure driver and start a session', function (done) {
|
||||
getDriver()
|
||||
.then(function () {
|
||||
failedToStart = false;
|
||||
}, fail)
|
||||
.fail(fail)
|
||||
.done(done);
|
||||
}, 10 * MINUTE);
|
||||
}, 15 * MINUTE);
|
||||
|
||||
describe('Specs.', function () {
|
||||
afterEach(function (done) {
|
||||
if (specsRun >= 15) {
|
||||
specsRun = 0;
|
||||
// we need to restart the session regularly because for some reason
|
||||
// when running against iOS 10 simulator on SauceLabs,
|
||||
// Appium cannot handle more than ~20 specs at one session
|
||||
// the error would be as follows:
|
||||
// "Could not proxy command to remote server. Original error: Error: connect ECONNREFUSED 127.0.0.1:8100"
|
||||
checkSession(done);
|
||||
return driver
|
||||
.quit()
|
||||
.then(function () {
|
||||
return getDriver();
|
||||
})
|
||||
.done(done);
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
}, 15 * MINUTE);
|
||||
|
||||
// getPicture() with mediaType: VIDEO, sourceType: PHOTOLIBRARY
|
||||
it('camera.ui.spec.1 Selecting only videos', function (done) {
|
||||
checkSession(done);
|
||||
specsRun += 1;
|
||||
var options = { sourceType: cameraConstants.PictureSourceType.PHOTOLIBRARY,
|
||||
mediaType: cameraConstants.MediaType.VIDEO };
|
||||
driver
|
||||
// skip ui unteractions
|
||||
.then(function () { return getPicture(options, false, true); })
|
||||
.waitForElementByXPath('//*[contains(@label,"Videos")]', MINUTE / 2)
|
||||
.elementByXPath('//*[@label="Cancel"]')
|
||||
.elementByAccessibilityId('Cancel')
|
||||
.click()
|
||||
.fail(saveScreenshotAndFail)
|
||||
.fail(gracefullyFail)
|
||||
.done(done);
|
||||
}, 3 * MINUTE);
|
||||
}, 7 * MINUTE);
|
||||
|
||||
// getPicture(), then dismiss
|
||||
// wait for the error callback to be called
|
||||
@@ -228,6 +322,7 @@ describe('Camera tests iOS.', function () {
|
||||
if (!isDevice) {
|
||||
pending('Camera is not available on iOS simulator');
|
||||
}
|
||||
specsRun += 1;
|
||||
var options = { sourceType: cameraConstants.PictureSourceType.CAMERA,
|
||||
saveToPhotoAlbum: false };
|
||||
driver
|
||||
@@ -237,15 +332,11 @@ describe('Camera tests iOS.', function () {
|
||||
.then(function () {
|
||||
return checkPicture(false);
|
||||
})
|
||||
.fail(saveScreenshotAndFail)
|
||||
.fail(gracefullyFail)
|
||||
.done(done);
|
||||
}, 3 * MINUTE);
|
||||
}, 7 * MINUTE);
|
||||
|
||||
it('camera.ui.spec.3 Verifying target image size, sourceType=CAMERA', function (done) {
|
||||
checkSession(done);
|
||||
if (!isDevice) {
|
||||
pending('Camera is not available on iOS simulator');
|
||||
}
|
||||
var options = {
|
||||
quality: 50,
|
||||
allowEdit: false,
|
||||
@@ -255,11 +346,10 @@ describe('Camera tests iOS.', function () {
|
||||
targetHeight: 210
|
||||
};
|
||||
|
||||
runSpec(options).done(done);
|
||||
}, 3 * MINUTE);
|
||||
runSpec(options, done, pending).done(done);
|
||||
}, 7 * MINUTE);
|
||||
|
||||
it('camera.ui.spec.4 Verifying target image size, sourceType=SAVEDPHOTOALBUM', function (done) {
|
||||
checkSession(done);
|
||||
var options = {
|
||||
quality: 50,
|
||||
allowEdit: false,
|
||||
@@ -269,11 +359,10 @@ describe('Camera tests iOS.', function () {
|
||||
targetHeight: 210
|
||||
};
|
||||
|
||||
runSpec(options).done(done);
|
||||
}, 3 * MINUTE);
|
||||
runSpec(options, done, pending).done(done);
|
||||
}, 7 * MINUTE);
|
||||
|
||||
it('camera.ui.spec.5 Verifying target image size, sourceType=PHOTOLIBRARY', function (done) {
|
||||
checkSession(done);
|
||||
var options = {
|
||||
quality: 50,
|
||||
allowEdit: false,
|
||||
@@ -283,17 +372,13 @@ describe('Camera tests iOS.', function () {
|
||||
targetHeight: 210
|
||||
};
|
||||
|
||||
runSpec(options).done(done);
|
||||
}, 3 * MINUTE);
|
||||
runSpec(options, done, pending).done(done);
|
||||
}, 7 * MINUTE);
|
||||
|
||||
it('camera.ui.spec.6 Verifying target image size, sourceType=CAMERA, destinationType=FILE_URL', function (done) {
|
||||
// remove this line if you don't mind the tests leaving a photo saved on device
|
||||
pending('Cannot prevent iOS from saving the picture to photo library');
|
||||
|
||||
checkSession(done);
|
||||
if (!isDevice) {
|
||||
pending('Camera is not available on iOS simulator');
|
||||
}
|
||||
var options = {
|
||||
quality: 50,
|
||||
allowEdit: false,
|
||||
@@ -304,11 +389,10 @@ describe('Camera tests iOS.', function () {
|
||||
targetHeight: 210
|
||||
};
|
||||
|
||||
runSpec(options).done(done);
|
||||
}, 3 * MINUTE);
|
||||
runSpec(options, done, pending).done(done);
|
||||
}, 7 * MINUTE);
|
||||
|
||||
it('camera.ui.spec.7 Verifying target image size, sourceType=SAVEDPHOTOALBUM, destinationType=FILE_URL', function (done) {
|
||||
checkSession(done);
|
||||
var options = {
|
||||
quality: 50,
|
||||
allowEdit: false,
|
||||
@@ -319,11 +403,10 @@ describe('Camera tests iOS.', function () {
|
||||
targetHeight: 210
|
||||
};
|
||||
|
||||
runSpec(options).done(done);
|
||||
}, 3 * MINUTE);
|
||||
runSpec(options, done, pending).done(done);
|
||||
}, 7 * MINUTE);
|
||||
|
||||
it('camera.ui.spec.8 Verifying target image size, sourceType=PHOTOLIBRARY, destinationType=FILE_URL', function (done) {
|
||||
checkSession(done);
|
||||
var options = {
|
||||
quality: 50,
|
||||
allowEdit: false,
|
||||
@@ -334,17 +417,13 @@ describe('Camera tests iOS.', function () {
|
||||
targetHeight: 210
|
||||
};
|
||||
|
||||
runSpec(options).done(done);
|
||||
}, 3 * MINUTE);
|
||||
runSpec(options, done, pending).done(done);
|
||||
}, 7 * MINUTE);
|
||||
|
||||
it('camera.ui.spec.9 Verifying target image size, sourceType=CAMERA, destinationType=FILE_URL, quality=100', function (done) {
|
||||
// remove this line if you don't mind the tests leaving a photo saved on device
|
||||
pending('Cannot prevent iOS from saving the picture to photo library');
|
||||
|
||||
checkSession(done);
|
||||
if (!isDevice) {
|
||||
pending('Camera is not available on iOS simulator');
|
||||
}
|
||||
var options = {
|
||||
quality: 100,
|
||||
allowEdit: false,
|
||||
@@ -354,11 +433,10 @@ describe('Camera tests iOS.', function () {
|
||||
targetWidth: 305,
|
||||
targetHeight: 305
|
||||
};
|
||||
runSpec(options).done(done);
|
||||
}, 3 * MINUTE);
|
||||
runSpec(options, done, pending).done(done);
|
||||
}, 7 * MINUTE);
|
||||
|
||||
it('camera.ui.spec.10 Verifying target image size, sourceType=SAVEDPHOTOALBUM, destinationType=FILE_URL, quality=100', function (done) {
|
||||
checkSession(done);
|
||||
var options = {
|
||||
quality: 100,
|
||||
allowEdit: false,
|
||||
@@ -369,11 +447,10 @@ describe('Camera tests iOS.', function () {
|
||||
targetHeight: 305
|
||||
};
|
||||
|
||||
runSpec(options).done(done);
|
||||
}, 3 * MINUTE);
|
||||
runSpec(options, done, pending).done(done);
|
||||
}, 7 * MINUTE);
|
||||
|
||||
it('camera.ui.spec.11 Verifying target image size, sourceType=PHOTOLIBRARY, destinationType=FILE_URL, quality=100', function (done) {
|
||||
checkSession(done);
|
||||
var options = {
|
||||
quality: 100,
|
||||
allowEdit: false,
|
||||
@@ -384,17 +461,12 @@ describe('Camera tests iOS.', function () {
|
||||
targetHeight: 305
|
||||
};
|
||||
|
||||
runSpec(options).done(done);
|
||||
}, 3 * MINUTE);
|
||||
runSpec(options, done, pending).done(done);
|
||||
}, 7 * MINUTE);
|
||||
|
||||
// combine various options for getPicture()
|
||||
generateOptions().forEach(function (spec) {
|
||||
it('camera.ui.spec.12.' + spec.id + ' Combining options. ' + spec.description, function (done) {
|
||||
checkSession(done);
|
||||
if (!isDevice && spec.options.sourceType === cameraConstants.PictureSourceType.CAMERA) {
|
||||
pending('Camera is not available on iOS simulator');
|
||||
}
|
||||
|
||||
// remove this check if you don't mind the tests leaving a photo saved on device
|
||||
if (spec.options.sourceType === cameraConstants.PictureSourceType.CAMERA &&
|
||||
spec.options.destinationType === cameraConstants.DestinationType.NATIVE_URI) {
|
||||
@@ -402,8 +474,8 @@ describe('Camera tests iOS.', function () {
|
||||
'For more info, see iOS quirks here: https://github.com/apache/cordova-plugin-camera#ios-quirks-1');
|
||||
}
|
||||
|
||||
runSpec(spec.options).done(done);
|
||||
}, 3 * MINUTE);
|
||||
runSpec(spec.options, done, pending).done(done);
|
||||
}, 7 * MINUTE);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"name": "cordova-plugin-camera",
|
||||
"version": "2.3.1",
|
||||
"version": "2.4.1",
|
||||
"description": "Cordova Camera Plugin",
|
||||
"types": "./types/index.d.ts",
|
||||
"cordova": {
|
||||
"id": "cordova-plugin-camera",
|
||||
"platforms": [
|
||||
|
||||
@@ -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="2.3.1">
|
||||
version="2.4.1">
|
||||
<name>Camera</name>
|
||||
<description>Cordova Camera Plugin</description>
|
||||
<license>Apache 2.0</license>
|
||||
@@ -249,7 +249,7 @@
|
||||
<clobbers target="CameraPopoverHandle" />
|
||||
</js-module>
|
||||
<js-module src="src/windows/CameraProxy.js" name="CameraProxy">
|
||||
<merges target="" />
|
||||
<runs />
|
||||
</js-module>
|
||||
|
||||
</platform>
|
||||
@@ -276,7 +276,7 @@
|
||||
<clobbers target="CameraPopoverHandle" />
|
||||
</js-module>
|
||||
<js-module src="src/windows/CameraProxy.js" name="CameraProxy">
|
||||
<merges target="" />
|
||||
<runs />
|
||||
</js-module>
|
||||
</platform>
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
|
||||
}
|
||||
else if ((this.srcType == PHOTOLIBRARY) || (this.srcType == SAVEDPHOTOALBUM)) {
|
||||
// FIXME: Stop always requesting the permission
|
||||
if(!PermissionHelper.hasPermission(this, permissions[0])) {
|
||||
if(!PermissionHelper.hasPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE)) {
|
||||
PermissionHelper.requestPermission(this, SAVE_TO_ALBUM_SEC, Manifest.permission.READ_EXTERNAL_STORAGE);
|
||||
} else {
|
||||
this.getImage(this.srcType, destType, encodingType);
|
||||
@@ -577,6 +577,9 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
|
||||
if (this.encodingType == JPEG) {
|
||||
String exifPath;
|
||||
exifPath = uri.getPath();
|
||||
//We just finished rotating it by an arbitrary orientation, just make sure it's normal
|
||||
if(rotate != ExifInterface.ORIENTATION_NORMAL)
|
||||
exif.resetOrientation();
|
||||
exif.createOutFile(exifPath);
|
||||
exif.writeExifData();
|
||||
}
|
||||
|
||||
14
tests/package.json
Normal file
14
tests/package.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "cordova-plugin-camera-tests",
|
||||
"version": "2.4.1-dev",
|
||||
"description": "",
|
||||
"cordova": {
|
||||
"id": "cordova-plugin-camera-tests",
|
||||
"platforms": []
|
||||
},
|
||||
"keywords": [
|
||||
"ecosystem:cordova"
|
||||
],
|
||||
"author": "",
|
||||
"license": "Apache 2.0"
|
||||
}
|
||||
@@ -22,11 +22,11 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:rim="http://www.blackberry.com/ns/widgets"
|
||||
id="cordova-plugin-camera-tests"
|
||||
version="2.3.1">
|
||||
version="2.4.1">
|
||||
<name>Cordova Camera Plugin Tests</name>
|
||||
<license>Apache 2.0</license>
|
||||
|
||||
<dependency id="cordova-plugin-file" version=">=2.0.0" />
|
||||
|
||||
<dependency id="cordova-plugin-file-transfer" />
|
||||
|
||||
<js-module src="tests.js" name="tests">
|
||||
</js-module>
|
||||
|
||||
@@ -177,7 +177,7 @@ exports.defineManualTests = function (contentEl, createActionButton) {
|
||||
ft.onprogress = function (progressEvent) {
|
||||
console.log('progress: ' + progressEvent.loaded + ' of ' + progressEvent.total);
|
||||
};
|
||||
var server = "http://cordova-filetransfer.jitsu.com";
|
||||
var server = "http://sheltered-retreat-43956.herokuapp.com";
|
||||
|
||||
ft.upload(pictureUrl, server + '/upload', win, fail, options);
|
||||
function win(information_back) {
|
||||
|
||||
174
types/index.d.ts
vendored
Normal file
174
types/index.d.ts
vendored
Normal file
@@ -0,0 +1,174 @@
|
||||
// Type definitions for Apache Cordova Camera plugin
|
||||
// Project: https://github.com/apache/cordova-plugin-camera
|
||||
// Definitions by: Microsoft Open Technologies Inc <http://msopentech.com>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
//
|
||||
// Copyright (c) Microsoft Open Technologies Inc
|
||||
// Licensed under the MIT license.
|
||||
|
||||
interface Navigator {
|
||||
/**
|
||||
* This plugin provides an API for taking pictures and for choosing images from the system's image library.
|
||||
*/
|
||||
camera: Camera;
|
||||
}
|
||||
|
||||
/**
|
||||
* This plugin provides an API for taking pictures and for choosing images from the system's image library.
|
||||
*/
|
||||
interface Camera {
|
||||
/**
|
||||
* Removes intermediate photos taken by the camera from temporary storage.
|
||||
* @param onSuccess Success callback, that called when cleanup succeeds.
|
||||
* @param onError Error callback, that get an error message.
|
||||
*/
|
||||
cleanup(
|
||||
onSuccess: () => void,
|
||||
onError: (message: string) => void): void;
|
||||
/**
|
||||
* Takes a photo using the camera, or retrieves a photo from the device's image gallery.
|
||||
* @param cameraSuccess Success callback, that get the image
|
||||
* as a base64-encoded String, or as the URI for the image file.
|
||||
* @param cameraError Error callback, that get an error message.
|
||||
* @param cameraOptions Optional parameters to customize the camera settings.
|
||||
*/
|
||||
getPicture(
|
||||
cameraSuccess: (data: string) => void,
|
||||
cameraError: (message: string) => void,
|
||||
cameraOptions?: CameraOptions): void;
|
||||
// Next will work only on iOS
|
||||
//getPicture(
|
||||
// cameraSuccess: (data: string) => void,
|
||||
// cameraError: (message: string) => void,
|
||||
// cameraOptions?: CameraOptions): CameraPopoverHandle;
|
||||
}
|
||||
|
||||
interface CameraOptions {
|
||||
/** Picture quality in range 0-100. Default is 50 */
|
||||
quality?: number;
|
||||
/**
|
||||
* Choose the format of the return value.
|
||||
* Defined in navigator.camera.DestinationType. Default is FILE_URI.
|
||||
* DATA_URL : 0, Return image as base64-encoded string
|
||||
* FILE_URI : 1, Return image file URI
|
||||
* NATIVE_URI : 2 Return image native URI
|
||||
* (e.g., assets-library:// on iOS or content:// on Android)
|
||||
*/
|
||||
destinationType?: number;
|
||||
/**
|
||||
* Set the source of the picture.
|
||||
* Defined in navigator.camera.PictureSourceType. Default is CAMERA.
|
||||
* PHOTOLIBRARY : 0,
|
||||
* CAMERA : 1,
|
||||
* SAVEDPHOTOALBUM : 2
|
||||
*/
|
||||
sourceType?: number;
|
||||
/** Allow simple editing of image before selection. */
|
||||
allowEdit?: boolean;
|
||||
/**
|
||||
* Choose the returned image file's encoding.
|
||||
* Defined in navigator.camera.EncodingType. Default is JPEG
|
||||
* JPEG : 0 Return JPEG encoded image
|
||||
* PNG : 1 Return PNG encoded image
|
||||
*/
|
||||
encodingType?: number;
|
||||
/**
|
||||
* Width in pixels to scale image. Must be used with targetHeight.
|
||||
* Aspect ratio remains constant.
|
||||
*/
|
||||
targetWidth?: number;
|
||||
/**
|
||||
* Height in pixels to scale image. Must be used with targetWidth.
|
||||
* Aspect ratio remains constant.
|
||||
*/
|
||||
targetHeight?: number;
|
||||
/**
|
||||
* Set the type of media to select from. Only works when PictureSourceType
|
||||
* is PHOTOLIBRARY or SAVEDPHOTOALBUM. Defined in nagivator.camera.MediaType
|
||||
* PICTURE: 0 allow selection of still pictures only. DEFAULT.
|
||||
* Will return format specified via DestinationType
|
||||
* VIDEO: 1 allow selection of video only, WILL ALWAYS RETURN FILE_URI
|
||||
* ALLMEDIA : 2 allow selection from all media types
|
||||
*/
|
||||
mediaType?: number;
|
||||
/** Rotate the image to correct for the orientation of the device during capture. */
|
||||
correctOrientation?: boolean;
|
||||
/** Save the image to the photo album on the device after capture. */
|
||||
saveToPhotoAlbum?: boolean;
|
||||
/**
|
||||
* Choose the camera to use (front- or back-facing).
|
||||
* Defined in navigator.camera.Direction. Default is BACK.
|
||||
* FRONT: 0
|
||||
* BACK: 1
|
||||
*/
|
||||
cameraDirection?: number;
|
||||
/** iOS-only options that specify popover location in iPad. Defined in CameraPopoverOptions. */
|
||||
popoverOptions?: CameraPopoverOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
* A handle to the popover dialog created by navigator.camera.getPicture. Used on iOS only.
|
||||
*/
|
||||
interface CameraPopoverHandle {
|
||||
/**
|
||||
* Set the position of the popover.
|
||||
* @param popoverOptions the CameraPopoverOptions that specify the new position.
|
||||
*/
|
||||
setPosition(popoverOptions: CameraPopoverOptions): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* iOS-only parameters that specify the anchor element location and arrow direction
|
||||
* of the popover when selecting images from an iPad's library or album.
|
||||
*/
|
||||
interface CameraPopoverOptions {
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
/**
|
||||
* Direction the arrow on the popover should point. Defined in Camera.PopoverArrowDirection
|
||||
* Matches iOS UIPopoverArrowDirection constants.
|
||||
* ARROW_UP : 1,
|
||||
* ARROW_DOWN : 2,
|
||||
* ARROW_LEFT : 4,
|
||||
* ARROW_RIGHT : 8,
|
||||
* ARROW_ANY : 15
|
||||
*/
|
||||
arrowDir : number;
|
||||
}
|
||||
|
||||
declare var Camera: {
|
||||
// Camera constants, defined in Camera plugin
|
||||
DestinationType: {
|
||||
DATA_URL: number;
|
||||
FILE_URI: number;
|
||||
NATIVE_URI: number
|
||||
}
|
||||
Direction: {
|
||||
BACK: number;
|
||||
FRONT: number;
|
||||
}
|
||||
EncodingType: {
|
||||
JPEG: number;
|
||||
PNG: number;
|
||||
}
|
||||
MediaType: {
|
||||
PICTURE: number;
|
||||
VIDEO: number;
|
||||
ALLMEDIA: number;
|
||||
}
|
||||
PictureSourceType: {
|
||||
PHOTOLIBRARY: number;
|
||||
CAMERA: number;
|
||||
SAVEDPHOTOALBUM: number;
|
||||
}
|
||||
// Used only on iOS
|
||||
PopoverArrowDirection: {
|
||||
ARROW_UP: number;
|
||||
ARROW_DOWN: number;
|
||||
ARROW_LEFT: number;
|
||||
ARROW_RIGHT: number;
|
||||
ARROW_ANY: number;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user