public class CameraRollManager extends NativeCameraRollManagerSpec
NativeModule that allows JS to interact with the photos and videos on the device (i.e.
MediaStore.Images).NativeModule.NativeMethod| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
METHOD_TYPE_ASYNC, METHOD_TYPE_PROMISE, METHOD_TYPE_SYNC| Constructor and Description |
|---|
CameraRollManager(ReactApplicationContext reactContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
deletePhotos(ReadableArray assets,
Promise promise) |
java.lang.String |
getName() |
void |
getPhotos(ReadableMap params,
Promise promise)
Get photos from
MediaStore.Images, most recent first. |
void |
saveToCameraRoll(java.lang.String uri,
java.lang.String type,
Promise promise)
Save an image to the gallery (i.e.
|
getCurrentActivity, getReactApplicationContext, getReactApplicationContextIfActiveOrWarncanOverrideExistingModule, getConstants, hasConstants, initialize, invalidate, onCatalystInstanceDestroyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinvalidatepublic static final java.lang.String NAME
public CameraRollManager(ReactApplicationContext reactContext)
public java.lang.String getName()
require() this module
from javascript.public void saveToCameraRoll(java.lang.String uri,
java.lang.String type,
Promise promise)
MediaStore.Images). This copies the original file
from wherever it may be to the external storage pictures directory, so that it can be scanned
by the MediaScanner.saveToCameraRoll in class NativeCameraRollManagerSpecuri - the file://, http:// or https:// URI of the image to savepromise - to be resolved or rejectedpublic void getPhotos(ReadableMap params, Promise promise)
MediaStore.Images, most recent first.getPhotos in class NativeCameraRollManagerSpecparams - a map containing the following keys:
getPhotos(com.facebook.react.bridge.ReadableMap, com.facebook.react.bridge.Promise)
promise - the Promise to be resolved when the photos are loaded; for a format of the
parameters passed to this callback, see getPhotosReturnChecker in CameraRoll.jspublic void deletePhotos(ReadableArray assets, Promise promise)
deletePhotos in class NativeCameraRollManagerSpec