Prerequisites
- A working Android quickstart
- A compatible AR mask
.nosmaipackage
Obtain the mask
Use a compatible package from the Asset Store flow, either bundled or downloaded 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 typed item returned by getFilters or the cloud 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 a discovered or downloaded path and verify package compatibility |
| Mask is not selected in UI | Update selection only from apply success and pipeline state |
| Frame rate falls | Test the package at 720p and 30 FPS in a Release build |