@connectedbits/react-native-image-picker 2.4.13 → 2.4.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/.gradle/5.4.1/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/5.4.1/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/5.4.1/fileContent/fileContent.lock +0 -0
- package/android/.gradle/5.4.1/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/5.4.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/5.4.1/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/5.4.1/javaCompile/classAnalysis.bin +0 -0
- package/android/.gradle/5.4.1/javaCompile/jarAnalysis.bin +0 -0
- package/android/.gradle/5.4.1/javaCompile/javaCompile.lock +0 -0
- package/android/.gradle/5.4.1/javaCompile/taskHistory.bin +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/src/main/java/com/imagepicker/ImagePickerModule.java +9 -17
- package/package.json +1 -1
- package/android/.project +0 -17
- package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -285,12 +285,6 @@ public class ImagePickerModule extends ReactContextBaseJavaModule
|
|
|
285
285
|
cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, cameraCaptureURI);
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
if (cameraIntent.resolveActivity(reactContext.getPackageManager()) == null)
|
|
289
|
-
{
|
|
290
|
-
responseHelper.invokeError(callback, "Cannot launch camera");
|
|
291
|
-
return;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
288
|
// Workaround for Android bug.
|
|
295
289
|
// grantUriPermission also needed for KITKAT,
|
|
296
290
|
// see https://code.google.com/p/android/issues/detail?id=76683
|
|
@@ -309,7 +303,7 @@ public class ImagePickerModule extends ReactContextBaseJavaModule
|
|
|
309
303
|
catch (ActivityNotFoundException e)
|
|
310
304
|
{
|
|
311
305
|
e.printStackTrace();
|
|
312
|
-
responseHelper.invokeError(callback, "Cannot launch camera");
|
|
306
|
+
responseHelper.invokeError(callback, "Cannot launch camera, unable to start");
|
|
313
307
|
}
|
|
314
308
|
}
|
|
315
309
|
|
|
@@ -364,12 +358,6 @@ public class ImagePickerModule extends ReactContextBaseJavaModule
|
|
|
364
358
|
}
|
|
365
359
|
}
|
|
366
360
|
|
|
367
|
-
if (libraryIntent.resolveActivity(reactContext.getPackageManager()) == null)
|
|
368
|
-
{
|
|
369
|
-
responseHelper.invokeError(callback, "Cannot launch photo library");
|
|
370
|
-
return;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
361
|
try
|
|
374
362
|
{
|
|
375
363
|
String chooseWhichLibraryTitle = null;
|
|
@@ -711,23 +699,27 @@ public class ImagePickerModule extends ReactContextBaseJavaModule
|
|
|
711
699
|
|
|
712
700
|
private void parseOptions(final ReadableMap options) {
|
|
713
701
|
noData = false;
|
|
702
|
+
pickVideo = false;
|
|
703
|
+
pickBoth = false;
|
|
704
|
+
videoQuality = 1;
|
|
705
|
+
videoDurationLimit = 0;
|
|
706
|
+
if(options == null){
|
|
707
|
+
return;
|
|
708
|
+
}
|
|
709
|
+
|
|
714
710
|
if (options.hasKey("noData")) {
|
|
715
711
|
noData = options.getBoolean("noData");
|
|
716
712
|
}
|
|
717
713
|
imageConfig = imageConfig.updateFromOptions(options);
|
|
718
|
-
pickVideo = false;
|
|
719
|
-
pickBoth = false;
|
|
720
714
|
if (options.hasKey("mediaType") && options.getString("mediaType").equals("mixed")) {
|
|
721
715
|
pickBoth = true;
|
|
722
716
|
}
|
|
723
717
|
if (options.hasKey("mediaType") && options.getString("mediaType").equals("video")) {
|
|
724
718
|
pickVideo = true;
|
|
725
719
|
}
|
|
726
|
-
videoQuality = 1;
|
|
727
720
|
if (options.hasKey("videoQuality") && options.getString("videoQuality").equals("low")) {
|
|
728
721
|
videoQuality = 0;
|
|
729
722
|
}
|
|
730
|
-
videoDurationLimit = 0;
|
|
731
723
|
if (options.hasKey("durationLimit")) {
|
|
732
724
|
videoDurationLimit = options.getInt("durationLimit");
|
|
733
725
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@connectedbits/react-native-image-picker",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.15",
|
|
4
4
|
"description": "A React Native module that allows you to use native UI to select media from the device library or directly from the camera",
|
|
5
5
|
"react-native": "src/index.ts",
|
|
6
6
|
"types": "lib/typescript/index.d.ts",
|
package/android/.project
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<projectDescription>
|
|
3
|
-
<name>android_</name>
|
|
4
|
-
<comment>Project android_ created by Buildship.</comment>
|
|
5
|
-
<projects>
|
|
6
|
-
</projects>
|
|
7
|
-
<buildSpec>
|
|
8
|
-
<buildCommand>
|
|
9
|
-
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
|
|
10
|
-
<arguments>
|
|
11
|
-
</arguments>
|
|
12
|
-
</buildCommand>
|
|
13
|
-
</buildSpec>
|
|
14
|
-
<natures>
|
|
15
|
-
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
|
16
|
-
</natures>
|
|
17
|
-
</projectDescription>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
arguments=
|
|
2
|
-
auto.sync=false
|
|
3
|
-
build.scans.enabled=false
|
|
4
|
-
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
|
|
5
|
-
connection.project.dir=
|
|
6
|
-
eclipse.preferences.version=1
|
|
7
|
-
gradle.user.home=
|
|
8
|
-
java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home
|
|
9
|
-
jvm.arguments=
|
|
10
|
-
offline.mode=false
|
|
11
|
-
override.workspace.settings=true
|
|
12
|
-
show.console.view=true
|
|
13
|
-
show.executions.view=true
|