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, andaddGameEventListenercontrol 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.