Commit Graph

111 Commits

Author SHA1 Message Date
Jamie Curtis
e6c64ea1b5 Set this.callback before permissionsCheck so that permissionDenied dialog doesn't crash when trying to call the callback (#808) 2018-10-03 15:15:01 -04:00
Himanshu Kushwah
6d24702205 Update ImagePickerModule.java to fix multiple tap on upload image button crash (#782)
* Update ImagePickerModule.java

when multiple time image picker open is clicked doOnCancel() function cause app crash.
updated to handle case when callback is null.

* Update ImagePickerModule.java
2018-10-02 15:50:24 -04:00
Rudy
7fc3e3b4c1 Fix Android to bypass GIF image compression (#725) 2018-10-02 13:46:22 -04:00
nathan-K-
7b9ff643c7 Use filestorage.path on android #885 (#886)
* Add support for fileStorage.path on Android

* Update README.md
2018-09-28 10:19:27 -04:00
satinos
78bf08cd7b Fix runtime crashe for Android 7. (#918)
Crash message:
        Tried to read an int but got non-integral double.
2018-09-28 10:17:43 -04:00
Nicolas Charpentier
8187eaf1ca Check for presence of project-wide gradle configuration properties 2018-09-28 10:10:51 -04:00
David Alexander Bjerremose
694fa1de5c Fix permission issue (#848) 2018-05-13 10:33:49 -07:00
Haitao Li
60169dc5df
Merge pull request #571 from rigdern/rigdern/fileprovider-conflict
Avoid conflicting with other FileProviders
2018-02-20 21:01:43 -08:00
Carsten Pfeiffer
876c193871 Avoid copying image data when saving and close the stream!
Instead of duplicating the entire image in memory with
ByteArrayOutputStream.toByteArray(), write to the FileOutputStream without copying.
2017-11-13 16:39:26 +01:00
Aaron Trank
d25c17f3ed Add support for KitKat (API level 19) (#583) 2017-09-05 17:29:34 -04:00
cani1see
f37d925085 null checker for some old phones (#621) 2017-09-05 10:10:37 -04:00
Eugene Sokovikov
a95cbe6504 disable permission dialog when permissionDenied=null (#622) 2017-09-05 09:58:35 -04:00
Haitao Li
fd4a3d18f8 Merge pull request #565 from react-community/android-image-sampling
[Android] Subsample image to save memory.
2017-08-17 20:52:26 -07:00
Radek Czemerys
15c4e2a718 Remove createJSModules @overide marker - RN 0.47 compatibility (#653) 2017-08-13 05:17:12 -04:00
Adam Comella
48e8683245 Avoid conflicting with other FileProviders
If multiple AndroidManifest.xml files specify FileProviders (e.g. the app, a library like react-native-image-picker), you may receive compilation errors when these AndroidManifest.xml files are merged due to conflicts in fields such as `android:authorities` and `android:resource`.

This occurs when multiple AndroidManifest.xml files specify a `android.support.v4.content.FileProvider`. To avoid the conflict, we subclass `android.support.v4.content.FileProvider` and then we refer to our subclass in the AndroidManifest.xml file to avoid the conflict.

This solution is described here: http://stackoverflow.com/a/41550634
2017-05-03 15:50:03 -07:00
Haitao Li
2eb0ebca4d [Android] Subsample image to save memory. 2017-04-30 12:04:54 -07:00
Marc Shilling
bdcbb09900 remove unnecessary import that was causing build to fail 2017-04-11 20:16:14 -04:00
Alexey Podolian
1efe791f3a Update build.gradle (#535) 2017-04-11 20:00:58 -04:00
Alexander
e644eac84f [ ANDROID ] Added support of storageOptions key (#513)
* Fixed saving photo path

* Removed Logs

* Recovered Example

* NOTES:

* Refactored onActivityResume
* Added first test

* Updated PULL REQUEST TEMPLATE
2017-04-11 19:59:46 -04:00
Kevin Cooper
f5d379f8b1 Allow saving to camera roll on Android (#516)
* Allow saving to camera roll on Android

* Move the new file so it also works for files that aren't resized
2017-03-19 14:18:03 -04:00
egpast
646e427633 Android: fix cancellation handling (#506)
- This was broken by #496.
- Currently, the response object is empty, lacking the `didCancel` flag.
2017-03-10 12:04:29 -05:00
Alexander
92e35a6ea2 Fixed minimal version for FileProvider (#500) 2017-03-07 18:58:23 -05:00
Victor Duate da Silva
cd89afed73 Undo commit bf79750 to solve thw Warning 'provider#android.support.v4.content.FileProvider@android:authorities was tagged at AndroidManifest.xml:8 to replace other declarations but no other declaration present' (#497) 2017-03-04 19:35:10 -05:00
Alexander
7eaa65dc6d [ANDROID] Refactoring of Code plus bug fixes (#496)
* Fixed issue#485
Fixed issue#478

* Removed useless file

* Recoverd options for launchCamera and launchImageLibrary
2017-03-04 15:52:57 -05:00
Alexander
bf79750395 Fixed bug of getting authority for Android 5.1 (#486) 2017-02-26 11:06:15 -05:00
Alexander Ustinov
3dd1d6ab75 Merge branch 'refactoring' 2017-02-24 11:27:21 +07:00
Alexander Ustinov
b53f930a31 Cleaned up showImagePicker logic 2017-02-24 11:22:33 +07:00
Alexander Ustinov
e6b6c3c6e4 Leading to the same code style 2017-02-20 00:57:07 +07:00
Marc Shilling
3b7c1d8968 move minSdkVersion back to 16 2017-02-18 11:17:38 -05:00
Marc Shilling
483f9bd61f oops 2017-02-17 08:48:05 -05:00
Marc Shilling
5afc66ea54 some changes 2017-02-16 23:02:20 -05:00
Alexander Ustinov
a5ef4df07a Removed Logs 2017-02-06 23:27:12 +07:00
Alexander Ustinov
a5fd097f6d Added support Android higher 6.0
Implemented of getting real path from react-native-image-crop-picker
Extended react-native-image-crop-picker real path
2017-02-01 18:27:05 +07:00
Marc Shilling
776ca61db3 we now support AND REQUIRE React Native version > 0.40 2017-01-10 21:54:18 -05:00
Marc Shilling
03b66f956d use holo light dialog theme 2016-11-30 12:32:34 -05:00
Jesse Sessler
5bddf80868 Send originalRotation in response (#388)
* Send originalRotation in response

* Remove originalRotation from ios response
2016-11-28 14:38:02 -08:00
Kelvin Liang
1c7e53d3ce make the resized image not being stretched 2016-11-19 11:02:24 -04:00
Yoann FUKS
61801bb71b [Android] #343 + robustness code 2016-10-14 16:43:29 +02:00
Marc Shilling
4d6f5c2a77 make request codes 16 bit ints 2016-09-28 12:11:30 -04:00
Marc Shilling
16a48d59b5 make request codes more unique 2016-09-22 09:07:17 -04:00
Marc Shilling
f370ac8789 decode file after resizing to get the new width and height 2016-09-16 12:36:44 -04:00
Josh Swan
c5761829f1 Fix empty initialWidth and initialHeight [Android] (#315) 2016-09-16 09:34:28 -04:00
Marc Shilling
05309a82c5 support for RN 0.33 with backwards compatibility 2016-09-13 13:24:09 -04:00
Marc Shilling
9d227c0b37 save images to cache unless storageOptions key is provided 2016-09-08 16:58:36 -04:00
Andrew Shini
0fdea9cd64 Use array for custom buttons to ensure order (#296)
* Use array for custom buttons

* Remove space

* Import Log
2016-08-30 13:02:53 -04:00
yao
822df7e7ae ios save video,android bug when save photo/video (#292)
* Update ImagePickerManager.m

Don't save the photo when it is selected from photo library.
Save the video to camera roll when it is selected from camera  while storageOptions.cameraRoll is true.

* Update ImagePickerModule.java

There is a bug in some android versions when saving a photo or video to sd card,  the photo/video will not appear in the Gallery app.
2016-08-24 12:08:30 -04:00
Ivan Pusic
85257f7292 simplity "if" 2016-08-10 10:36:41 +02:00
Marc Shilling
4b2eb555ea add comment 2016-07-29 11:47:25 -04:00
Dmitry Gladkov
146cf6ee56 implement empty onNewIntent method to fix #275 2016-07-29 15:40:49 +03:00
Marc Shilling
32dbd290b0 remove allowsEditing option from Android 2016-07-19 15:20:27 -04:00