Commit Graph

70 Commits

Author SHA1 Message Date
José Luis Ballesteros del Val
3b8f64e330 CB-12964: (android) Fix of bug when Pictures folder did not exist.
If someone had removed Pictures folder in android, plugin failed trying to move there the new photo. This happened because plugin did not check the existence of this folder, and if not, it did not complete the folder tree.

This closes #273
2017-07-04 14:03:10 +03:00
Sergii Stotskyi
c3d7e55ad4 CB-12682: (ios, android): changes cancel error message to be consistent for ios android 2017-06-07 07:36:30 +03:00
Joe Bowser
bba8283d98 CB-12005: Changing the getOrientation method to return the defined enumerated EXIF instead of orientation in degrees for Consistency
This closes #252
2017-02-02 12:10:42 -08:00
Sergey Zolotarev
d29c767f07 CB-12368: Fix permission check on Android
The plugin was checking whether camera permission was granted but then
actually requested permission for external storage.

Surprisingly enough this fixed CB-12368.
2017-01-30 23:52:54 +01:00
Shazron Abdullah
8b83171ee2 Fix missing license headers. 2016-12-07 16:19:39 -08:00
Joe Bowser
84f96c1067 CB-11625: Files Provider does not work with Android 4.4.4 or lower, and I have no idea why. Working around with CordovaUri 2016-10-27 13:37:03 -07:00
Joe Bowser
61064ae3ed CB-11625 (Android) : Make this work with previous versions of Cordova via cordova-plugin-compat 2016-10-21 15:12:34 -07:00
Joe Bowser
b63a0d83e0 Merging API 24 code with master including large refactor 2016-09-01 15:11:33 -07:00
swbradshaw
f8682b9162 Removed unneeded file
This closes #197
2016-08-29 10:46:14 -07:00
swbradshaw
0ed6406864 Merge remote-tracking branch 'refs/remotes/apache/master'
Rebase from Master
2016-08-26 20:30:35 -04:00
Simon MacDonald
6e19147b09 Plugin uses Android Log class and not Cordova LOG class 2016-08-22 15:52:52 -04:00
Joe Bowser
3ed3d887ca BuildConfig from test project crept in source code thanks to Android Studio, removing 2016-08-04 11:35:39 -07:00
Joe Bowser
00e0a7dc46 CB-11625: Managed to get Content Providers to work with a weird mix of Content Providers and non-Content Providers 2016-08-03 14:43:11 -07:00
Joe Bowser
b62fdf50f7 Adding provider_paths.xml so this works 2016-07-29 13:33:51 -07:00
Joe Bowser
3d26986bfd CB-11625: Working on fix to API 24 no longer allowing File URIs to be passed across intents 2016-07-27 14:06:07 -07:00
Vladimir Kotikov
fed798e6c7 CB-11447 Respect output format when retrieving images from gallery 2016-07-26 15:59:52 +03:00
Julio César
0115458ce8 Set android quality default value to 50 on the java code
Default value is set to 80 on the java code, but doc says that default
value is 50.

I’m changing it just for making code clearer, but default value is set
to 50 to all platforms in Camera.js if no value is passed
2016-05-16 19:43:01 +02:00
swbradshaw
e3a431cbeb Reverted indenting done by Android Studio 2016-05-12 21:25:36 -04:00
swbradshaw
832d6e3bea Adding missing function 2016-05-12 13:19:35 -04:00
swbradshaw
f2b4eeded0 CB-4078: Fix for orientation/scaling on Android 4.4+ devices
The only way to get rotation for photos in library (Gallery, File
System, Google Drive,etc) is to first create a temporary file from the
provider. Only then can we determine the orientation and scale the
bitmap correctly. By doing it in a central place, it eliminates reading
the inputstream repetitively in the plugin.
2016-04-27 22:27:37 -04:00
Simon MacDonald
a9c18710f2 Replace PermissionHelper.java with cordova-plugin-compat 2016-04-05 12:17:18 -04:00
riknoll
0cd962466d CB-10120 android: Fixing use of constants and PermissionHelper
This closes #179
2016-03-14 17:56:52 -07:00
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
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
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
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
Vladimir Kotikov
dca8bd1943 CB-9623 Fixes various issues when encodingType set to png 2015-09-08 17:18:57 +03: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
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
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
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
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
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
Manu Garcia Urreta
5b8324e984 Prevent NPE on processResiultFromGallery when intent comes null
close #22
2014-06-27 13:33:03 -04:00