Effects Android
Effects / Reference / API reference / Android
Updated August 27, 2026

Look up the public Android 3.0.4 lifecycle, preview, effects, beauty, Cloud Filters, recording, and output APIs.

Entry points

TypePurpose
NosmaiSDKInitialization, processing, package slots, recording, and off-screen output
NosmaiPreviewViewGPU preview, Camera2 input surface, lifecycle, recording surface, and texture callbacks
NosmaiBeautyBeauty, colour, makeup, reshape, eye colour, hair colour, and manual backgrounds
NosmaiCloudLicensed cloud catalog, pagination, cache state, download, and progress
NosmaiEffectsAuthored package metadata and runtime parameter controls

Initialize and process

APIResult
NosmaiSDK.initialize(context, licenseKey)Initializes the process-wide native runtime
NosmaiSDK.isInitialized()Reports whether initialization was accepted
NosmaiSDK.startProcessing(previewView)Connects processing to a prepared NosmaiPreviewView
NosmaiSDK.stopProcessing()Stops processing while preserving the initialized runtime
NosmaiSDK.cleanup()Releases process-wide SDK resources
NosmaiPreviewView.onResume() / onPause()Mirrors the owning Activity or Fragment lifecycle

Apply and clear packages

APINotes
NosmaiSDK.applyEffect(path)Applies a downloaded Cloud Filter
NosmaiSDK.setAREffect(path) / clearAREffect()Controls the AR-effect slot
NosmaiSDK.setFilter(path) / clearFilter()Controls the filter slot
NosmaiSDK.clearAllEffects()Clears all active effect state
NosmaiSDK.removeAllEffects()Compatibility alias for the full clear operation

Apply package mutations serially and check the returned boolean. Do not pass a URL, cloud identifier, query string, or partial download to a path method.

Runtime parameters

Use NosmaiEffects.getEffectParameters() after applying an authored package. Update numeric, integer, or Boolean controls with setEffectParameter(name, float) and text controls with setEffectParameter(name, String). Read numeric values with getEffectParameterValue(name) and treat Float.NaN as unavailable. Parameter names, types, ranges, and options belong to the active package.

Cloud Filters

Call NosmaiCloud.isEnabled() before showing cloud-only controls. Use NosmaiCloud.fetch(query), inspect NosmaiCloud.list() and NosmaiCloud.pagination(), then call NosmaiCloud.download(filterId, ...). The download callback returns the verified local path that can be passed to NosmaiSDK.applyEffect(path). NosmaiCloud.cachedList() reports the SDK cache; lastError() provides a public diagnostic without exposing service routes.

Beauty and backgrounds

NosmaiBeauty exposes skin smoothing, skin whitening, teeth whitening, sharpening, brightness, contrast, RGB, hue, saturation, exposure, white balance, grayscale, eye colour, makeup layers, reshape controls, hair colour, background blur, background image, and background colour. Use the documented value range for the selected method and use the matching remove or clear method instead of clearing unrelated package slots.

Recording and output

  • startRecording(preview, outputPath, callback) and stopRecording(callback) manage processed recording.
  • setTextureListener, setTextureFrameCallback, and external I420 methods support app-owned output pipelines. Release stream slots after consumption.

Ownership rules

Keep one Camera2 owner and one NosmaiPreviewView per active session. Stop the previous camera before navigating to a second camera screen. Run lifecycle and view operations on the Android main thread and keep high-rate texture work out of Java object-conversion paths.

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