Socket
Socket
Sign inDemoInstall

react-native-image-picker

Package Overview
Dependencies
Maintainers
2
Versions
212
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-image-picker - npm Package Compare versions

Comparing version 0.12.2 to 0.12.4

6

package.json

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc