Commit Graph

213 Commits

Author SHA1 Message Date
ochakov
c12206ebc8 CB-10120 android: Fix missing CAMERA permission for Android M
According to the PR conversation, when android.permission.CAMERA
is not set in the package, there is no need to ask for the
camera permission. Also, checking now camera and storage
permissions separately, so if only one of them is missing, the
other one will be requested and not both.

Rebased by MatthewBooth and riknoll

This closes #142, closes #174
2016-03-14 17:03:26 -07:00
Julio César
76c129c95e CB-10460 getRealPath return null in some cases
Now there is only a function to get the real path on API 11 and above.
2016-03-11 20:43:08 +01:00
Richard Knoll
a19c75253a CB-10825 android: Always request READ permission for gallery source
This closes #191
2016-03-09 17:56:20 -08:00
Raghav Katyal
9c906b2ab7 CB-10414: Adding focus handler to resume video when user comes back on leaving the app while preview was running 2016-03-02 14:15:01 -08:00
Raghav Katyal
2cd2528d1c Adding missing semi colon 2016-02-29 10:30:40 -08:00
Raghav Katyal
5f7f4f3e55 Adding focus handler to make sure filepicker gets launched when app is active 2016-02-26 14:15:27 -08:00
Miguel Revetria
20dcaf2cb3 CB-10128: [iOS] Fixed how checks access authorization to camera & library. This closes #146 2016-02-24 16:10:20 -08:00
daserge
b16c5234d5 CB-10636 Add JSHint for plugins 2016-02-24 17:14:58 +03:00
Julio César
16636d18f2 Added a lot of more cases to get the real path
Added a lot of more cases to get the real path

This closes #175
2016-02-22 11:54:22 -08:00
Julio César
019346d188 Fix for CB-10625
getDocumentId was crashing in some cases.
Now, in case it crashes, it will use the original uri to query.
2016-02-22 11:23:53 -08:00
Sarangan Rajamanickam
77653183dd CB-10576: MobileSpec can't get results for Windows-Store 8.1 Builds
Fixing a minor syntax issue
2016-02-09 16:17:17 -08:00
Raghav Katyal
654286d373 CB-10539: Commenting out the verySmallQvga maxResolution option 2016-02-05 15:03:19 -08:00
Raghav Katyal
76ad059c9c CB-10541: Changing default maxResoltion to be highestAvailable for CameraCaptureUI 2016-02-04 12:14:16 -08:00
Laurent Deketelaere
5b38453262 CB-10113 Browser - Layer camera UI on top of all!
Adds CSS style {position: 'relative', z-index: 2147483647} (2147483647 is the highest possible z-index) on DOM appended elements.

This closes #134
2016-02-02 17:02:15 +10:00
Tim Barham
e48a7e5c5c CB-10502 Fix camera plugin exception in Chrome when click capture.
The MediaStream.stop() method has been deprecated as of Chrome 47. We were using it, and it was generating an exception.

If stop() method is not found, instead stop each individual track (the new way of doing it).
2016-02-02 16:31:39 +10:00
Raghav Katyal
06fcbf05a2 Adding comments 2016-01-21 14:11:59 -08:00
PerfectionCSGO
9a9081b0d4 Camera tapping fix 2016-01-21 14:07:51 -08:00
riknoll
1d32ea46f0 CB-10319 android: Adding reflective helper methods for permission requests 2016-01-12 17:42:29 -08:00
riknoll
e2193631d5 CB-9189 android: Implementing save/restore API to handle Activity destruction 2016-01-05 14:18:43 -08:00
Shazron Abdullah
e8fa1695c4 CB-10241 - App Crash cause by Camera Plugin ios 7 2015-12-22 17:54:07 -08:00
Raghav Katyal
ef5484a2aa CB-8940 Setting z-index values to maximum for UI buttons. This closes #140. 2015-11-19 17:36:06 -08:00
Jesse MacFadyen
63ac782b32 remove unneeded weakness 2015-11-17 16:56:35 -08:00
Jesse MacFadyen
7f3a0a5483 CB-8863 correct block usage for async calls 2015-11-17 16:37:45 -08:00
riknoll
036cdfdeb8 CB-5479 android: changed saveToPhotoAlbum to save uncompressed images 2015-11-17 12:03:30 -08:00
riknoll
2bb134bf6b CB-9169 android: Fixed filetype for uncompressed images and added quirk 2015-11-10 17:26:07 -08:00
Joe Bowser
88592575fe CB-9446 related: Removing CordovaResource library code in favour of the code we're supposed to be deprecating because that at least works. 2015-11-09 14:28:58 -08:00
riknoll
9b444c39ba CB-9910 android: Add permission request for some gallery requests 2015-11-02 15:25:33 -08:00
Joe Bowser
44475d9df9 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.
2015-10-22 16:19:13 -07:00
Joe Bowser
cbe17eec21 Fix permission handling 2015-10-22 16:19:12 -07:00
Joe Bowser
8024c5de49 CB-9583: Permissions for Marshmallow 2015-10-22 16:19:12 -07:00
Nelson Antunes
dbe3e3d2ca
Try to use realpath filename instead of default modified.jpg 2015-10-15 01:21:05 +01:00
Jesse MacFadyen
a030c52f7f change 'case' to else-if. This closes #113 2015-10-14 18:08:01 +03:00
Julio César
b8a68af63f CB-6190 - iOS camera plugin ignores quality parameter
CB-6190 - iOS camera plugin ignores quality parameter in some
circunstances
Added a check to not downscale if quality is 100 or sourceType !=
UIImagePickerControllerSourceTypeCamera (according to the docs, images
from gallery aren’t downscaled). This closes #108
2015-10-14 17:09:44 +03:00
sgrebnov
837d6721f2 CB-9633 iOS Taking a Picture With Option destinationType:NATIVE_URI Doesn't Show Image
This closes #122
2015-10-14 16:19:48 +03:00
sgrebnov
454a6f518c CB-9622 Windows Phone 8 Camera Option destinationType:NATIVE_URI is a NO-OP
•	WP8 proxy now supports NATIVE_URI param
•	Treat NATIVE_URI same way as FILE_URI (similar to Android).

This closes #119
2015-09-09 13:01:48 +03:00
Vladimir Kotikov
dca8bd1943 CB-9623 Fixes various issues when encodingType set to png 2015-09-08 17:18:57 +03:00
Jakub Navrátil
cad9ab0419 CB-9591 Retaining aspect ratio when resizing 2015-09-01 10:49:12 -07:00
Murat Sutunc
ee5cfe89a5 CB-9443 Pick correct maxResolution
This closes #111, closes #56
2015-08-03 15:45:55 -07:00
Murat Sutunc
813d143667 CB-9151 Trigger captureAction only once 2015-08-03 10:09:15 -07:00
Murat Sutunc
110b3b3388 CB-9413 Close RandomAccessStream once copied 2015-07-27 11:39:38 -07:00
Gillardo
c50757c245 CB-9349 Focus control and nice UI
Removed old comment, move style text. close #106
2015-07-10 10:03:36 -07:00
Joe Bowser
899802a202 CB-9259: Forgot to add another check on which URI we're using when fixing this thing the first time 2015-07-07 14:27:44 -07:00
Shazron Abdullah
1e607ddcc8 CB-9247 - typo 2015-06-25 06:22:24 -07:00
Shazron Abdullah
63110ea54c CB-9247 - Added macro to conditionally add NSData+Base64.h 2015-06-25 06:20:25 -07:00
Shazron Abdullah
b683315be6 CB-9247 - Fixes compilation errors with cordova-ios 4.x 2015-06-25 06:09:59 -07:00
vladimir
363dd02584 Fix returning native url on windows. 2015-06-17 16:14:58 -05:00
Murat Sutunc
a6cc9271a0 CB-8883 fix picture rotation issue 2015-05-26 12:32:53 -07:00
Jesse MacFadyen
b3430e6f80 one more alias 2015-05-20 16:31:59 -07:00
Jesse MacFadyen
888a9661fb Fixed some nit white-space issues, aliased a little more 2015-05-20 16:17:57 -07:00
Jesse MacFadyen
15f66bf5cd major refactor : readability 2015-05-18 21:38:34 -07:00
Jesse MacFadyen
33ffb17c97 Patch for CB-8498, this closes #64 2015-05-18 17:32:14 -07:00
Murat Sutunc
a830b3e08b CB-8879 fix stripe issue with correct aspect ratio 2015-05-13 11:50:03 -07:00
Dan Polivy
9f9e5ef4a9 CB-7667 iOS8: Handle case where camera is not authorized (closes #49)
In iOS 7+, when the app does not have access to the camera, show a
prompt notifying the user so they're not puzzled by looking at a black
screen.

In iOS 8+, include a link on the dialog to open the Setting app to allow
the user to change their Camera privacy setting.

Signed-off-by: Shazron Abdullah <shazron@apache.org>
2015-05-11 17:26:00 -07:00
Murat Sutunc
69c687e0cf CB-8943 fix PickAndContinue issue on Win10Phone 2015-05-06 12:05:36 -07:00
Alan Kinzie
b0ee9dd905 CB-8253 Fix potential unreleased resources
There was a place (~line 701) in CameraLauncher.java where there was the
potential for input and output streams to never be closed if an exception
occurs at the wrong time.   There were some other places where an
InputStream was used anonymously, and so would never be closed.

This change introduces try/finally blocks to ensure that the streams will
always end up closed.

Change-Id: I479bceddcd631bfec45c3f5ee7e88ddb04c59073

Signed-off-by: Joe Bowser <bowserj@apache.org>

(Closes #90)
2015-05-06 10:17:43 -07:00
Joe Bowser
c2e0db2b86 CB-8909: Remove unused import from File 2015-04-24 14:24:47 -07:00
Murat Sutunc
8f07f562a2 CB-8404 typo fix cameraproxy.js
There was a missing comma on cameraproxy

github close #89
2015-04-22 14:39:40 -07:00
Murat Sutunc
1e8c836844 CB-8404 Rotate camera feed with device orientation
CR-1

CR-2
2015-04-21 10:56:04 -07:00
Vladimir Kotikov
b131021303 CB-8054 Support taking pictures from file for WP8 2015-04-21 15:22:40 +03:00
Murat Sutunc
0dabe94416 CB-8054 Support taking pictures from file for WP8
codereview

codereview 2
2015-04-16 14:19:01 -07:00
Murat Sutunc
fb8ce21711 CB-8405 Use z-index instead of z-order 2015-04-16 12:44:29 -07:00
Connor Pearson
af36e74d05 CB-8780 - Display popover using main thread. Fixes popover slowness (closes #81) 2015-04-10 17:30:28 -07:00
Vladimir Kotikov
3927735d09 CB-8706, CB-8707 saveToPhotoAlbum improvements and some refactoring
- On Windows we should use filePicker instead of programmatically
accessing user libs. This way the app doesnt have to depend on extra
capabilities.

- Some refactoring to help on navigating code easier

This closes #78
2015-04-07 21:48:00 +03:00
Murat Sutunc
9e11ab4dfb CR fixes 2015-04-03 11:08:00 -07:00
Steve Gill
ee4ac0d7b2 CB-8683 updated blackberry specific references of org.apache.cordova.camera to cordova-plugin-camera 2015-04-01 11:40:30 -07:00
Joe Bowser
9fe5b430aa 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 2015-04-01 11:04:06 -07:00
Joe Bowser
23dbb8889a 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 2015-04-01 11:04:06 -07:00
Joe Bowser
ac4af88f55 CB-8740: Partial fix for Save Image to Gallery error found in MobileSpec 2015-04-01 11:04:06 -07:00
Gene Connolly
04ed502d92 CB-8351 Fix custom implementation of integerValueForKey (close #79)
2ead6335c9 (diff-3cfd0e1f93894bd4e501e8e0e4634850)
2015-03-30 20:10:24 -04:00
Murat Sutunc
29c9ea387d CB-8707 refactoring windows code to improve readability 2015-03-18 11:03:01 -07:00
Murat Sutunc
5ef04e552c CB-8706 use filePicker if saveToPhotoAlbum is true 2015-03-18 10:59:18 -07:00
Ian Clelland
9e4174caff CB-8659: ios: 4.0.x Compatibility: Remove use of deprecated headers 2015-03-13 10:46:47 -04:00
Jesse MacFadyen
2a93a48956 Fix localize key for Videos. This closes #58 2015-03-09 17:34:36 -07:00
Serge Huijben
929733b891 CB-8235 android: Fix crash when selecting images from DropBox with spaces in path (close #65) 2015-03-04 20:33:21 -05:00
Jesse MacFadyen
f39a08ba29 Merge branch 'patch-1' of https://github.com/vilic/cordova-plugin-camera 2015-03-03 14:43:07 -08:00
Murat Sutunc
bca73e6ee9 CB-8599 fix threading issue with cameraPicker (fixes #72)
Signed-off-by: Shazron Abdullah <shazron@apache.org>
2015-03-03 14:09:29 -08:00
VILIC VANE
d7e708db09 add try ... catch for getting image orientation
There's bug in Windows Phone 8.1 causing Seek on a DssPhotoStream not working properly.
https://connect.microsoft.com/VisualStudio/feedback/details/783252
But a mis-oriented file is better than nothing, so try and catch.
2015-01-29 01:31:21 +08:00
Andrew Grieve
80b0048384 CB-8351 ios: Stop using now-deprecated [NSData base64EncodedString] 2015-01-27 10:56:19 -05:00
Andrew Grieve
2ead6335c9 CB-8351 ios: Stop using now-deprecated integerValueForKey: class extension 2015-01-27 10:47:04 -05:00
Andrew Grieve
2a0735d551 CB-8351 Unbreak build from previous commit 2015-01-27 10:19:46 -05:00
Andrew Grieve
4f056f0a73 CB-8351 Use argumentForIndex rather than NSArray extension 2015-01-23 09:49:20 -05:00
Shazron Abdullah
376bec2b96 CB-8032 - Camera Plugin - Add nativeURL external method support for CDVFileSystem->makeEntryForPath:isDirectory: (closes #57) 2015-01-09 16:24:31 -08:00
Shazron Abdullah
482f2ac2cc CB-7938 - Added XCTest unit tests project, with stubs (adapted from SplashScreen unit test setup) (closes #60) 2015-01-09 16:04:28 -08:00
Shazron Abdullah
35c653d24d CB-7937 - Re-factor iOS Camera plugin so that it is testable (closes #52)
Signed-off-by: Shazron Abdullah <shazron@apache.org>
2015-01-09 15:39:29 -08:00
Kris Selden
0d389857cf Fix memory leak of image data in imagePickerControllerReturnImageResult
A __bridge_retained cast increments the count and requires a CFRelease, this should just be __bridge a cast since it isn’t being held onto by this method.

close #51
2014-10-09 20:26:45 -04:00
Brian Bolton
8b8db828f6 Pass uri to crop instead of pulling the low resolution image out of the intent return (close #43) 2014-10-07 15:47:04 -04:00
yoshifp
03fade661e Add orientation support for PNG to Android (closes #45) 2014-10-07 15:44:27 -04:00
ktsour
3581c595d7 CB-7551 - [Camera][iOS 8] Scaled images show a white line
Signed-off-by: Shazron Abdullah <shazron@apache.org>
2014-09-15 23:13:34 -07:00
Wang Jinggang
513bfde49e CB-7558 - hasPendingOperation flag in Camera plugin's takePicture should be reversed to fix memory errors
Signed-off-by: Shazron Abdullah <shazron@apache.org>
2014-09-15 15:34:18 -07:00
Suraj Pindoria
986bf6fd3c Fixed minor bugs with the browser 2014-09-10 15:38:09 -07:00
Shazron Abdullah
ae22820046 CB-4003 - Add config option to not use location information in Camera plugin (and default to not use it) 2014-09-05 11:08:15 -07:00
Shazron Abdullah
fa30a56760 CB-7461 - Geolocation fails in Camera plugin in iOS 8 2014-09-05 11:08:15 -07:00
Vladimir Kotikov
6dcfa9cf9b CB-7378 Use single Proxy for both windows8 and windows. 2014-09-05 11:08:15 -07:00
Vladimir Kotikov
f3cfadb19e CB-7378 Adds support for windows platform 2014-09-05 11:07:49 -07:00
Suraj Pindoria
b2403c6076 Added support for the browser 2014-08-29 15:14:41 -07:00
Bryan Higgins
d53a7770d9 CB-7286 [BlackBerry10] Use getUserMedia if camera card is unavailable 2014-08-12 11:42:18 -04:00
Shazron Abdullah
42bf5d2983 CB-7180 - Update Camera plugin to support generic plugin webView UIView (which can be either a UIWebView or WKWebView) 2014-08-11 23:13:15 -07:00
Willy Aguirre
c696f6e0b3 update CameraProxy.js 2014-07-28 20:42:43 -05:00
Andrew Grieve
e4ab155fd0 CB-7071 android: Fix callback firing before CROP intent is sent when allowEdit=true 2014-07-03 13:21:52 -04:00
Dominik Pesch
543c4198d8 CB-6875 android: Handle exception when SDCard is not mounted
close #29
2014-06-27 13:55:18 -04:00