A camera and gallery image picker native module for Android, giving a subset of the API of https://github.com/marcshilling/react-native-image-picker
Java Objective-C JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


What is it?

It's an Android counterpart to the UIImagePicker native module for iOS. Thanks marcshilling and everyone else that contributed for that one!

How can I try it?

This project can be run out of the box to try out the image picker. Get react-native-cli if you don't have it already with npm install -g react-native-cli. Run react-native run-android from the root directory of this project with a device attached or an Android simulator running. Make sure you don't have other react packagers fighting for ports.

How can I use it in my own projects?

Follow these steps to integrate with your own project. Each step links to a commit detailing what to do. The commits have comments explaining the purpose of each change.

  1. Add ActivityResultListener.java, ImagePickerModule.java and ImagePickerPackage.java to the Java code for your react-native application. This commit does that for this project.
  2. Add code to your MainActivity to register ImagePickerPackage and notify it of Activity results. Here's a commit showing how.
  3. Use it in your JavaScript code. The API right now just supports .launchCamera(...) and .launchImageLibrary(...) and doesn't support any of the extra options. This commit shows how it was done in our example.