Effects Android
Effects / Guides / Runtime parameters / Android

Control Nosmai effect parameters on Android

Updated August 27, 2026

Inspect controls authored into the active effect package, update numeric or text values, and keep Android UI ranges metadata-driven.

Prerequisites

  • A working Android quickstart
  • An active effect package that declares runtime parameters
  • Java 11 or later for local-variable type inference in the inspection example

Read the authored controls

Query parameters only after package application succeeds:

var parameters = NosmaiEffects.getEffectParameters();

for (var parameter : parameters) {
    Log.d("EffectControls",
            parameter.name + " (" + parameter.type + ")");
}

Metadata includes the authored name and type, current and default values, optional display text, range information, and option values. Do not copy a parameter name from another package.

Update a value

Replace each placeholder with a name returned by getEffectParameters:

boolean updated = NosmaiEffects.setEffectParameter(
        "AUTHORED_PARAMETER_NAME", 0.5f);

boolean textUpdated = NosmaiEffects.setEffectParameter(
        "AUTHORED_TEXT_PARAMETER_NAME", "Hello");

Clamp numeric input to the declared range. Integer and Boolean controls accept the numeric overload; string controls require the string overload.

Verify the update

Read a numeric value with NosmaiEffects.getEffectParameterValue(parameterName). A missing value returns Float.NaN; a rejected update returns false. The preview should update without reapplying the package.

Common errors

SymptomCauseFix
The parameter list is emptyNo compatible package is active, or the active package declares no controlsApply the package successfully before querying
The setter returns falseThe authored name or type does not match the chosen overloadUse the exact returned metadata and matching setter
UI values do not match the packageThe app hard-coded a global rangeRead and enforce the active parameter's range and options

Next steps

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