108 Commits

Author SHA1 Message Date
Ruslan Baybekov
71e335dd80
[android] filter image types if cropping only (#1422)
ref #1421
2020-10-01 11:57:57 +02:00
Ruslan Baybekov
9838f5300e
[android] filter possible image types for cropping (#1421)
Now `react-native-image-crop-picker` allow to choose any `image/*` file for cropping. But related to https://github.com/Yalantis/uCrop/issues/166#issuecomment-245606245 only `libjpeg` and `libpng` under the hood libUCrop. So I think will be useful to filter image files only ready for cropping
2020-10-01 11:15:33 +02:00
Ivan Pusic
688fcb380b
fix camera on android 30 2020-09-15 23:30:29 +02:00
Kai Dederichs
47062fde4a
Fix android crash by updating to newest uCrop (#1380) 2020-08-24 13:32:30 +02:00
Kostiantyn Solianyk
3503626385
Duration of the picked video (in milliseconds) (#1325)
* [ANDROID] (get duration from any video)

platform - ANDROID
updated - PickerModule.java
implemented: 
1) get video duration in milliseconds from any video
* implemented without any additional installations and dependencies

* [IOS] (get duration from any video)

platform - IOS
updated - ImageCropPicker.m
implemented: 
1) get video duration in milliseconds from any video
* implemented without any additional installations and dependencies

* updated README.md

add duration property to "Response Object"
Description for field - "Video duration time in milliseconds"

* change seconds to milliseconds
2020-06-26 15:07:19 +02:00
Ahmed Mohamed AbdelMagied
ec953f887a
Add Cropper Toolbar title color (#1320)
* fix: change example `Podfile.lock` package version to the latest one

* chore: update README and example

* feat: add crop toolbar widget color prop
2020-06-17 20:32:51 +02:00
Ivan Pusic
87a043210d
(android) set cropper colors only if provided. remote default colors 2020-06-10 19:56:17 +02:00
Ivan Pusic
2423efd7b1
upgrade ucrop to support androidx and sdk 29 2020-05-02 01:16:55 +02:00
Ivan Pusic
1ddd03e5a9
support for android sdk 29 (#1284)
* Switch Android SDK 29 deprecated methods to alternatives (ivpusic#1110)

Android SDK 29 deprecated the following method for getting external directories
that we use repeatedly.
https://developer.android.com/reference/android/os/Environment#getExternalStoragePublicDirectory(java.lang.String)

I converted the various use cases to use the suggested alternative in
the Context API.
https://developer.android.com/reference/android/content/Context.html#getExternalFilesDir(java.lang.String)

* Updated podspec

* Added iOS 13 DarkMode for picker (#1129)

* Update README.md

* version bump

* Removed isMovingToParentViewController so scroll to bottom works (#1137)

* Fix deprecated RCTImageLoader.h import (#1142)

* upgrade example project to react-native 0.61

* version bump

* Update README.md

* Fix crash after video recording in ios13 & xcode11 (#1145)

* Fix crash after video recording in ios13 & xcode11

UI-related code should run in main thread, as exception says:

`Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'threading violation: expected the main thread'`

* Typo fix

* Fix xCode warnings about main thread execution (#1146)

This kind of warnings also presents in output console if Main Thread Checker is active

* ignore iml files

* version bump

* Fix typo (#1150)

Changed the word "noticable" to "noticeable".

* update type (#1200)

* CocoaPods - Properly Interpolate Tag Version (#1174)

Why?
* Ruby uses `"` quotes when interpolation is required.  Using `'` will mean `v#{version}` 
  is used directly rather than providing the version number.

Changes:
1. User Ruby string interpolation when setting the tag version for the source.

* small typing improvements

* version bump

* fix typings for writeTempFile

* version bump

* (ios) changing images sort order

* upgrade react-native-cli

* using local QBImagePicker as podspec

* Update README.md (#1265)

Clarify that avoidEmptySpaceAroundImage option is (ios only)

* testing with sdk 29

* update yarn.lock

* version bump

Co-authored-by: Phil Simmons <phil@flyclops.com>
Co-authored-by: Yury Korzun <yury@flyclops.com>
Co-authored-by: cr1s3c <yannre1210@gmail.com>
Co-authored-by: Filipe Merker <filipesmerker@gmail.com>
Co-authored-by: Artur Eshenbrener <strate@yandex.ru>
Co-authored-by: Suraneti Rodsuwan <suraneti.rod@gmail.com>
Co-authored-by: mikunimaru <43168745+mikunimaru@users.noreply.github.com>
Co-authored-by: Peter Lucak <login@peterlucak.com>
Co-authored-by: Ivan Pusic <ivpusic@users.noreply.github.com>
Co-authored-by: Mujtaba F. Radhi <al.mujtaba@hotmail.com>
2020-05-02 00:21:48 +02:00
Obi1Kennoby
d2cf904159 check permission before startCropping. Fix of #957 (#1095) 2019-08-15 21:14:04 +02:00
OmranElmasry
8aec9a4e53 update android support library to androidx (#1048)
* Update PickerModule.java

* Update RealPathUtil.java

* Update AndroidManifest.xml
2019-07-11 22:00:07 +02:00
Aldren Alangcao
42fd20edd6 Fix when Pictures directory is not existing on device (#1027) 2019-06-18 17:02:29 +02:00
JX Wang
334ca14d93 autoclose inputstream when base64 image file (#1040) 2019-06-18 17:00:48 +02:00
Ivan Pusic
b55bc5b1bc
example project support for android 9 2019-05-10 14:16:25 +02:00
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