Effects React Native
Effects / Guides / Photo capture / React Native

Capture an AR-filtered photo in React Native with Nosmai Effects

Updated August 19, 2026

Capture the current processed preview to a temporary JPEG and optionally copy it to the media library.

Prerequisites

Capture the processed frame

const photo = await NosmaiCameraSdk.capturePhoto();

console.log(photo.uri, photo.width, photo.height);

The result is a temporary local JPEG with uri, width, height, fileSizeBytes, and mimeType.

const saved = await NosmaiCameraSdk.saveImageToGallery(
  photo.uri,
  'nosmai-photo'
);

Only pass a local file:// URI returned by the SDK. The method rejects remote URLs and malformed paths.

Verify it worked

Apply a visible effect, capture once, and confirm that the JPEG exists and the saved media URI is returned.

Common errors

SymptomCauseFix
Capture rejects before returning a URIThe native camera view is not readyWait for the processed preview before calling capturePhoto
Gallery save failsMedia-library permission is missing or deniedRequest the platform permission before saving the returned file

Next steps

References

Nosmai

An AR and AI company. Founded on the idea that the next decade of software will be visual, and that the tools for it should be within reach of anyone building.

Newsletter

Product updates and release notes. No spam.

© 2026 nosmai, inc · all rights reserved