Skip to content

Photos

Provides access to your photo library.

In order to read from your photo library, you must grant the app access to your photo library. The first time you use the APIs, the app will prompt for access but if you deny the request, all API calls will fail. In that case you must enable access to the photo library from the system settings.

+fromLibrary

Presents the photo library for picking an image.

Use this for picking an image from the photo library.

static fromLibrary(): Promise<Image>

+fromCamera

Opens the camera for taking an image.

Use this for taking a new image using the camera.

static fromCamera(): Promise<Image>

+latestPhoto

Get latest photo.

Reads the latest photo from your photo library. If no photo is available, the promise will be rejected.

static latestPhoto(): Promise<Image>

+latestPhotos

Get latest photos.

Reads the latests photos from your photo library. If no photo is available, the promise will be rejected.

static latestPhotos(count: number): Promise<[Image]>

+latestScreenshot

Get latest screenshot.

Reads the latest screenshot from your photo library. If no screenshot is available, the promise will be rejected.

static latestScreenshot(): Promise<Image>

+latestScreenshots

Get latest screenshots.

Reads the latests screenshots from your photo library. If no screenshot is available, the promise will be rejected.

static latestScreenshots(count: number): Promise<[Image]>

+removeLatestPhoto

Removes latest photo.

Before removing the photo, an alert is shown prompting you to confirm the removal.

static removeLatestPhoto()

+removeLatestPhotos

Removes latest photos.

Before removing the photo, an alert is shown prompting you to confirm the removal.

static removeLatestPhotos(count: number)

+removeLatestScreenshot

Removes latest screenshot.

Before removing the screenshot, an alert is shown prompting you to confirm the removal.

static removeLatestScreenshot()

+removeLatestScreenshots

Removes latest screenshots.

Before removing the screenshot, an alert is shown prompting you to confirm the removal.

static removeLatestScreenshots(count: number)