94 Commits

Author SHA1 Message Date
Jonathan Bones
b3606ea940 Fix Android image rotation issue when compressing gallery and camera images (#379) (#986)
When using the image compression options, the returned resized image orientation differed from the original image. This caused selected images to often be rotated.

Original issue thread:
https://github.com/ivpusic/react-native-image-crop-picker/issues/379
2019-04-26 13:45:12 +02:00
Wilson
326e1809ba (android) add showCropFrame option (#972) 2019-03-28 23:54:18 +01:00
Ivan Pusic
719d5b48af replace compile with implementation in build.gradle 2019-03-20 22:35:33 +01:00
Ivan Pusic
e5ec520816 (android) simplify options parsing 2019-02-28 00:29:32 +01:00
Ivan Pusic
43740398f4 (android) cropping and resizing improvements 2019-02-28 00:26:27 +01:00
Ivan Pusic
e5622719c2
(feature) video recording (#917)
* Android: Add video recording support

- Caveats:
  - Wont work if cropping is enabled
- Video recording will be used if mediaType is set to 'video'
  - Mediatype any is not supported since there is no standard intent for capture image or video

* IOS: Add video recording support

- Caveats:
  - Cropping does not work

Video recording will be enabled if mediaType is set to `video` or `any`. Note: With any the native ui
allows the user to choose whether to take a photo or record a video. This differs from android where
mediaType any will just allow taking photos.

* IOS: Set camera video quality to high

* Update README.md (#851)

* Update PickerModule.java (#862)

Fix for default values being kept when calling cropPicker from multiple locations.

Now default values if not passed will be reverted to default.

* version bump

* Add front camera support for android (#876)

* Add front camera support for android

* Update readme

* Update readme

* Update README.md

* Added missing flags to support front camera on some android phones (#891)

* Remove problematic step from manual post-install steps (#821)

* (ios) fix images are not resized after cropping. Fixes #843

* (ios) add example project xcshareddata

* (ios) fixes for camera recording. updated example project with camera recording. updated readme with camera recording

* unify ios and android camera response. Fixes #872
2019-01-18 22:17:23 +01:00
juanjonucleus
104d32cba1 Added missing flags to support front camera on some android phones (#891) 2018-11-30 12:35:12 +01:00
Oleh Misuna
de3a52c41c Add front camera support for android (#876)
* Add front camera support for android

* Update readme

* Update readme
2018-11-09 14:04:45 +01:00
bartoszwolski
407ffdf837 Update PickerModule.java (#862)
Fix for default values being kept when calling cropPicker from multiple locations.

Now default values if not passed will be reverted to default.
2018-10-25 11:23:24 +02:00
Ivan Pusic
b7abb626be
Diegolmello master (#834)
* [FIX] Poor image quality after cropping

* Update README.md (#826)

Add optional configuration details about default ios text button for the camera and the gallery

* [IMPROVEMENT] fix android cropping height condition. update podfile lock
2018-09-19 16:15:00 +02:00
Andrew Shini
a0e7f820c6 Fall back to writing to file if _data column does not exist (#817)
* Fall back to writting to file if _data column does not exist

* Fix spelling
2018-09-07 10:28:44 +02:00
Andrew Shini
7efad7be4e Revert to compile (#796) 2018-08-21 15:22:08 +02:00
justindressler
e3eb95d2ec Change screen orientation so android will detect and change to match screen fixes issue #733 (#766) 2018-08-20 13:23:13 +02:00
starzle
9ce13581da Fix a bug when the file name contains slashes. (#775)
It can happen when selecting an image downloaded from Weibo app.
2018-08-20 13:20:45 +02:00
Carlos Q
7e94458c41 Use project-wide properties and new dependency (#771)
* Support for gradle 3.+
2018-07-19 23:11:00 +02:00
Mikunj Varsani
3b9af6416a Added android equivalent code for skipping image compression. (#753)
* Added android equivalent code to iOS code.

* Fix invalid variable.
2018-07-04 11:05:54 +02:00
Ivan Pusic
86e771d28d
Revert "Added android equivalent code to iOS code. (#749)" (#750)
This reverts commit 97ce8bab5245953f78909bc9b34a27c861c6ec99.
2018-07-03 11:11:37 +02:00
Mikunj Varsani
97ce8bab52 Added android equivalent code to iOS code. (#749) 2018-07-03 11:10:44 +02:00
Telmen Munkhdalai
88a03f54e3 [fix/android] Android API version under 19 crash fix (#741) 2018-06-30 12:09:58 +02:00
Ivan Pusic
5b8bb6aced (android) Result collector improvements 2018-05-16 18:49:51 +02:00
Ivan Pusic
874faa0aa1 (android) Upgrade ucrop to 2.2.2. Upgrade react-native for example project. Cleanup picker module 2018-05-16 18:20:58 +02:00
Theo de Villeneuve
4af61b49ea Add cloud support (Android) (#650)
* Add cloud support - workd in progress

* Fix extension issue

* Remove log, unused import

* Fix regression (MIME_TYPE for action_get_document)
2018-05-16 17:59:06 +02:00
Ivan Stroganov
dfa5e5d0ca Add chooseText and cancelText properties: rebased (#699)
* Add cancel and choose buttons text properties

* Change props names to ‘cancelText’,’chooseText’

* Add cancel and choose buttons text props

* Fix properties names IOS

* Add cropper prefix and update readme
2018-05-16 11:43:03 +02:00
Andrew Shini
4059492e57 Fix space in file name (#666)
* Improve getMimeType to handle files with spaces in file name

* Check for null
2018-04-03 18:25:34 +02:00
khrizt
b5520cc7cb Flag to disable color setters fro Ucrop (#662)
* Disabled cropper color assigning from code in Module

* Disable cropper color setters with a variable flag

* Update README
2018-03-27 11:53:43 +02:00
Nikola Ravic
ba4d84ede6 Added option to set free style crop for android. (#620)
As uCrop (on which this lib relies for Android) supports this feature I thought it would be very nice feature to have this.
2018-02-22 11:14:39 +01:00
Sergei Butko
56d1c69fc8 Added an flag to the gallery intent to prevent two instances of it (#582) 2018-01-22 10:17:14 +01:00
Ivan Pusic
b01a3504d9 upgrade android to support latest version 2017-12-07 01:54:25 +01:00
Ivan Magda
5633a99c4a Return cropped image rectangle (#458)
* android: Update ucrop version #457

Use latest uCrop version.

* Return cropped image rectangle #457

* Update README.md #457

Update Android installation instructions.
2017-12-07 01:47:38 +01:00
Jason Gaare
b59db6bffa Add creation and modification date to response (#530)
* added creationDate and modificationDate to response object

added modificationDate to Android response

* Update Compression.m (#529)

Addition of passthrough preset option

Update README to include dates in response
2017-12-05 01:48:06 +01:00
Ricardo Fuhrmann
b34b43654f [Android] Add option to set the cropper toolbar title (#521)
* Add option to set the cropper toolbar title

I needed to change the toolbar title but didn't know any other way so I thought about adding this functionality. Currently, as my knowledge is limited to java, this is currently only available for Android.

Example usage:

```
ImagePicker.openCropper({
    path: 'image.png',
    width: 800,
    height: 800,
    cropperToolbarTitle: 'Please, crop your photo',
})
```
If no title is provided, the default one from the library will be used.

* Update docs
2017-11-26 02:11:13 +01:00
Ivan Pusic
c44ce340e0 (android) remove dependency on support-annotations 2017-10-24 12:05:47 +02:00
Ivan Pusic
b47232befa (android) Android 8 support 2017-10-21 22:13:09 +02:00
Ivan Pusic
079e87ddae (android) update buildToolsVersion 2017-09-27 20:45:08 +02:00
Ivan Pusic
d3da5de487 extract exif data from image 2017-09-27 20:26:09 +02:00
Nadjib KHELIFATI
204f20bf89 Create another file for compressed picture with different name (#418)
* Create another file for compressed picture

For fix bug replace original image

* Update Compression.java
2017-08-23 16:19:42 +02:00
Nadjib KHELIFATI
54934f5e00 Use new version of id.zelory compressor package (#420)
Fix save file path issue of this package in this new version 2.1.0
2017-08-23 15:29:57 +02:00
Ivan Pusic
d0c481ec74 cleanup error codes 2017-08-10 00:03:50 +02:00
Ivan Pusic
6f24955b80 0.47 backward compatibile android support 2017-08-09 13:55:55 +02:00
Hizoul
c240c37dfa Fix Compilation Error in React Native 0.47.0
createJSModules was removedin React Native 0.47.0 and results in the attached Build Error.
removing `@Override` fixes build (didn't remove function because I don't know if it should be kept for downard compatability?)

```
node_modules/react-native-image-crop-picker/android/src/main/java/com/reactnative/ivpusic/imagepicker/PickerPackage.java:18: error: method does not override or implement a method from a supertype
    @Override
    ^
Note: /home/mmb/git/climbz2/climbz-reactnative/node_modules/react-native-image-crop-picker/android/src/main/java/com/reactnative/ivpusic/imagepicker/PickerModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
:react-native-image-crop-picker:compileReleaseJavaWithJavac FAILED
```
2017-08-01 19:35:30 +02:00
deathemperor
63e6f71db1 fixed a bug when using openCamera with [multiple: true]
related issue: https://github.com/ivpusic/react-native-image-crop-picker/issues/353
2017-07-20 11:41:49 +07:00
Ivan Pusic
b8ae847074 (android) upgrade to latest package versions 2017-06-24 00:41:29 +02:00
GNarek
1f27482988 Update PickerModule.java
As type of activeWidgetColor is int and type of DEFAULT_TINT is String it's causing error like: int cannot be dereferenced
2017-06-08 15:56:05 +04:00
Sahil Prajapati
a640c51567 Replace cropperTintColor with cropperActiveWidgetColor 2017-05-31 15:37:29 +05:30
Sahil Prajapati
da90c3363d Add options to control statusbar, toolbar and active widget color 2017-05-31 15:30:42 +05:30
André Vargas
81be2bd3b5 #283 (android) Create DIRECTORY_PICTURES if it doesn't exist 2017-04-06 14:19:50 -03:00
Olli Jaakkola
3d12a4510d (android) Add 'hideBottomControls' & 'enableRotationGesture' -options 2017-04-03 23:24:05 +03:00
Olli Jaakkola
f7dc45c45d Add possibility to hide crop guidelines 2017-04-03 14:10:23 +03:00
Andrew Shini
228bcaaea0 Add mediaType for Android 2017-03-13 22:42:05 +10:00
Ivan Pusic
2b04e10b4f (android) more efficient bitmap decoding 2017-03-07 10:00:20 +01:00