# Control effect parameters on Android

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

> For AI agents: the complete documentation index is at https://nosmai.com/llms/effects.txt

Product: Nosmai Effects
Platform: Android
Group: guide
Source: https://nosmai.com/docs/effects/guides/effects/control-runtime-parameters/android/

Available platform versions:
- iOS: https://nosmai.com/docs/effects/guides/effects/control-runtime-parameters/ios.md
- Android: https://nosmai.com/docs/effects/guides/effects/control-runtime-parameters/android.md
- React Native: https://nosmai.com/docs/effects/guides/effects/control-runtime-parameters/react-native.md
- Flutter: https://nosmai.com/docs/effects/guides/effects/control-runtime-parameters/flutter.md



## Prerequisites

- A working [Android quickstart](/docs/effects/quickstart/android/)
- 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:

```java
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`:

```java
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

| Symptom | Cause | Fix |
| --- | --- | --- |
| The parameter list is empty | No compatible package is active, or the active package declares no controls | Apply the package successfully before querying |
| The setter returns `false` | The authored name or type does not match the chosen overload | Use the exact returned metadata and matching setter |
| UI values do not match the package | The app hard-coded a global range | Read and enforce the active parameter's range and options |

## Next steps

- [Understand filters and effects](/docs/effects/concepts/filters-and-effects/)
- [Add an AR mask on Android](/docs/effects/guides/effects/add-an-ar-mask/android/)

## References

- [Android API reference](/docs/effects/reference/api/android/)
- [Android releases](https://github.com/nosmai/nosmai_effects_sdk_android/releases)
