expo / React Native Image Picker Android
Licence: mit
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
Stars: ✭ 34
Programming Languages
java
68154 projects - #9 most used programming language
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.
- Add
ActivityResultListener.java
,ImagePickerModule.java
andImagePickerPackage.java
to the Java code for your react-native application. This commit does that for this project. - Add code to your
MainActivity
to registerImagePickerPackage
and notify it of Activity results. Here's a commit showing how. - 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.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].