# React Native API reference

> Look up the stable React Native camera view, lifecycle, effects, beauty, cloud, media, frame, and game APIs.

> For AI agents: the complete documentation index is at https://nosmai.com/llms/effects.txt

Product: Nosmai Effects
Group: reference
Source: https://nosmai.com/docs/effects/reference/api/react-native/

## Entry points

| Export | Purpose |
| --- | --- |
| `NosmaiCameraSdk` | Typed TurboModule-backed operational API |
| `NosmaiCameraView` | Fabric preview view with optional automatic normalized game taps |
| `NosmaiSdkError` | Stable typed error with code, message, and safe native details |
| Expo config plugin | Adds required native project configuration for an Expo development build |

Version `1.0.0` requires React Native `0.81.5`, React `19.1`, New Architecture, Node
`20.19.4` or later, and physical ARM64 devices. Expo Go cannot load the native
module.

## Lifecycle and preview

Use `initialize`, mount `NosmaiCameraView`, then call `startProcessing` after
the view is ready. The lifecycle surface also includes `stopProcessing`,
`pauseCamera`, `resumeCamera`, `switchCamera`, and `cleanup`. Keep one mounted
preview and await cleanup before creating another SDK camera screen.

## Packages and parameters

`applyFilter(packagePath)` is the unified package call. Query state through
`getActiveEffects`, `getActiveFilterInfo`, and `getActiveEffectInfo`; clear with
`clearFilter`, `clearAREffect`, `removeEffect`, or `clearAll`. Authored controls
use `getEffectParameters`, `getEffectParameterValue`,
`setEffectParameter`, and `setEffectParameterString`.

## Catalog and Cloud Filters

Use `getLocalFilters(packageType?)` for the installed catalog and
`getDebugFilters(packageType?)` only for explicitly bundled development
assets. Cloud operations use `isCloudFilterEnabled`, `getCloudFilters(query)`,
`downloadCloudFilter(filter)`, and `removeCloudFilter(filter)`. Apply the local
URI returned by the download result; do not construct a private service URL.

## Visual controls

Version `1.0.0` exposes skin smoothing, whitening, teeth whitening, makeup layers,
signed reshape controls, eye colour, brightness, contrast, RGB, sharpening,
grayscale, hue, white balance, HSB, and manual blur, colour, image, or video
backgrounds. Check the beauty and advanced-feature capability methods before
showing gated controls.

## Games, media, and frames

- `isGameReady`, `sendGameTap`, `sendGameInput`, game lifecycle, and
  `addGameEventListener` control camera games.
- `capturePhoto`, recording methods, progress listeners, and gallery-save
  helpers return file URI based results.
- `startFrameStream`, `getLatestFrame`, `stopFrameStream`, and frame listeners
  provide bounded analysis sampling. They are not a high-rate streaming bridge.

Every `add...Listener` method returns a subscription. Remove it during screen
cleanup to prevent duplicate handlers.

## References

- [React Native quickstart](/docs/effects/quickstart/react-native/)
- [React Native platform guide](/docs/effects/platforms/react-native/)
- [npm package](https://www.npmjs.com/package/@nosmai/react-native-effects-sdk)
- [Package example](https://github.com/nosmai/nosmai_effects_sdk_react_native/tree/main/example)
