diff --git a/Libraries/CameraRoll/CameraRoll.js b/Libraries/CameraRoll/CameraRoll.js index 1f5c6c22a..a710e7ec1 100644 --- a/Libraries/CameraRoll/CameraRoll.js +++ b/Libraries/CameraRoll/CameraRoll.js @@ -109,17 +109,28 @@ var getPhotosReturnChecker = createStrictShapeTypeChecker({ }).isRequired, }); +/** + * `CameraRoll` provides access to the local camera roll / gallery. + */ class CameraRoll { static GroupTypesOptions: Array; static AssetTypeOptions: Array; /** - * Saves the image with tag `tag` to the camera roll. + * Saves the image to the camera roll / gallery. * - * @param {string} tag - Can be any of the three kinds of tags we accept: - * 1. URL - * 2. assets-library tag - * 3. tag returned from storing an image in memory + * @param {string} tag On Android, this is a local URI, such + * as `"file:///sdcard/img.png"`. + * + * On iOS, the tag can be one of the following: + * + * - local URI + * - assets-library tag + * - a tag not maching any of the above, which means the image data will + * be stored in memory (and consume memory as long as the process is alive) + * + * @param successCallback Invoked with the value of `tag` on success. + * @param errorCallback Invoked with error message on error. */ static saveImageWithTag(tag, successCallback, errorCallback) { invariant( @@ -140,10 +151,10 @@ class CameraRoll { * Invokes `callback` with photo identifier objects from the local camera * roll of the device matching shape defined by `getPhotosReturnChecker`. * - * @param {object} params - See `getPhotosParamChecker`. - * @param {function} callback - Invoked with arg of shape defined by - * `getPhotosReturnChecker` on success. - * @param {function} errorCallback - Invoked with error message on error. + * @param {object} params See `getPhotosParamChecker`. + * @param {function} callback Invoked with arg of shape defined by + * `getPhotosReturnChecker` on success. + * @param {function} errorCallback Invoked with error message on error. */ static getPhotos(params, callback, errorCallback) { var metaCallback = callback;