Feature access
AR Effects and Cloud Filters must be enabled for your Nosmai project before you can download and apply AR masks. Review your project's enabled features in Nosmai Console.
Prerequisites
- A working Android quickstart
- A compatible AR mask available through Cloud Filters
Obtain the mask
Select and download a compatible AR mask through Cloud Filters.
Apply it
NosmaiEffects.applyEffect(maskPath, new NosmaiEffects.EffectCallback() {
@Override public void onSuccess() {
// Update selected state after success.
}
@Override public void onError(String message) {
Log.e("Nosmai", message);
}
});
Remove it
NosmaiEffects.removeEffect(maskInfo);
Use the item returned by the Cloud Filter catalog.
Verify it worked
Test face loss, reacquisition, fast movement, glasses, partial occlusion, both cameras, and device rotation.
Common errors
| Symptom | Fix |
|---|---|
| Callback reports failure | Pass the successful Cloud Filter download result and verify compatibility |
| Mask is not selected in UI | Update selection only from apply success and pipeline state |
| Frame rate falls | Test the Cloud Filter at 720p and 30 FPS in a Release build |