Nosmai  Effects Nosmai  Moderation Nosmai Try-ons coming soon
Docs menu React Native
How-to guide

Capture a processed photo in React Native

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

Platform React Native SDK version 1.0.0 Updated Aug 19, 2026 Time 5 min

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

Was this page helpful?

Your response helps us prioritize documentation improvements.

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