react-native-image-picker
Advanced tools
Comparing version 0.12.2 to 0.12.4
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "0.12.2", | ||
"version": "0.12.4", | ||
"description": "A React Native module that allows you to use the native UIImagePickerController UI to select a photo from the device library or directly from the camera.", | ||
@@ -15,2 +15,6 @@ "author": "Marc Shilling (marcshilling)", | ||
"email": "vorj.dux@gmail.com" | ||
}, | ||
{ | ||
"name": "Yoann Fuks", | ||
"email": "yfuks@student.42.fr" | ||
} | ||
@@ -17,0 +21,0 @@ ], |
@@ -5,3 +5,2 @@ # react-native-image-picker | ||
### iOS | ||
** Requires iOS 8 or higher | ||
@@ -11,3 +10,3 @@ <img title="iOS" src="https://github.com/marcshilling/react-native-image-picker/blob/master/images/ios-image.png" width="50%"> | ||
### Android | ||
** Requires Api 11 or higher for Android | ||
**Requires Api 11 or higher for Android** | ||
@@ -44,2 +43,20 @@ <img title="Android" src="https://github.com/marcshilling/react-native-image-picker/blob/master/images/android-image.png" width="50%"> | ||
``` | ||
```xml | ||
<!-- file: android/src/main/AndroidManifest.xml --> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.myApp"> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<!-- add following permissions and the min targeted version --> | ||
<uses-sdk | ||
android:minSdkVersion="11"/> | ||
<uses-permission android:name="android.permission.CAMERA" /> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> | ||
<uses-feature android:name="android.hardware.camera" | ||
android:required="true"/> | ||
<uses-feature android:name="android.hardware.camera.autofocus" /> | ||
<!-- --> | ||
... | ||
``` | ||
```java | ||
@@ -83,2 +100,5 @@ // file: android/app/src/main/java/com/myappli/MainActivity.java | ||
... | ||
// handle onActivityResult | ||
@Override | ||
@@ -88,3 +108,2 @@ public void onActivityResult(final int requestCode, final int resultCode, final Intent data) { | ||
// handle onActivityResult | ||
mImagePicker.handleActivityResult(requestCode, resultCode, data); | ||
@@ -152,5 +171,9 @@ } | ||
else { | ||
// You can display the image using either: | ||
// You can display the image using either data: | ||
const source = {uri: 'data:image/jpeg;base64,' + response.data, isStatic: true}; | ||
// uri (on iOS) | ||
const source = {uri: response.uri.replace('file://', ''), isStatic: true}; | ||
// uri (on android) | ||
const source = {uri: response.uri, isStatic: true}; | ||
@@ -157,0 +180,0 @@ this.setState({ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
708539
219