react-native-android-gallery-image-picker
v2.4.1
Published
A simple Gallery-Image-Picker implementation. It only calls Android system function without any other UI customization. It only works on Android platform.
Downloads
48
Maintainers
Readme
react-native-android-gallery-image-picker
Getting started
$ npm install react-native-android-gallery-image-picker --save
Mostly automatic installation
$ react-native link react-native-android-gallery-image-picker
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-android-gallery-image-picker
and addRNAndroidGalleryImagePicker.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNAndroidGalleryImagePicker.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNAndroidGalleryImagePickerPackage;
to the imports at the top of the file - Add
new RNAndroidGalleryImagePickerPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-android-gallery-image-picker' project(':react-native-android-gallery-image-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-gallery-image-picker/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-android-gallery-image-picker')
Windows
- In Visual Studio add the
RNAndroidGalleryImagePicker.sln
innode_modules/react-native-android-gallery-image-picker/windows/RNAndroidGalleryImagePicker.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Android.Gallery.Image.Picker.RNAndroidGalleryImagePicker;
to the usings at the top of the file - Add
new RNAndroidGalleryImagePickerPackage()
to theList<IReactPackage>
returned by thePackages
method
Usage
import RNAndroidGalleryImagePicker from 'react-native-android-gallery-image-picker';
// TODO: What to do with the module?
RNAndroidGalleryImagePicker;