Effects Android
Effects / Guides / Cloud Filters / Android

Download and apply a Nosmai Cloud Filter in Android

Updated August 22, 2026

Fetch the Android Cloud Filter catalog away from the UI thread, download one filter, and apply it.

Prerequisites

Request the catalog

NosmaiCloud.fetch can perform network and disk work. Run it away from the main thread:

NosmaiCloud.FilterQuery query = new NosmaiCloud.FilterQuery();
query.filterType = "effects";
query.page = 1;
query.limit = 20;

cloudExecutor.execute(() -> {
    boolean success = NosmaiCloud.fetch(query);
    List<NosmaiCloud.Item> items = success
        ? NosmaiCloud.list()
        : Collections.emptyList();
    mainHandler.post(() -> render(items));
});

Download and apply

NosmaiCloud.download(item.id, (id, success, downloadedPath, error) -> {
    if (success && downloadedPath != null && !downloadedPath.isEmpty()) {
        NosmaiEffects.applyEffect(downloadedPath, effectCallback);
    }
});

Use NosmaiCloud.cachedList() for immediate cached UI, and deduplicate repeated taps by identifier.

Handle cache eviction

The SDK cache has no documented permanent TTL. Check cachedList() or the download result at the time of use. If the filter is unavailable after operating-system storage cleanup, download it again. Keep the Cloud Filter identifier as the durable application reference.

Verify it worked

Reopen the sheet and apply the cached item without another network download.

Common errors

SymptomFix
Camera UI freezesMove catalog fetch away from the main thread
Old response replaces a new tabTrack request ownership and ignore stale completion
Repeated taps create workKeep a thread-safe in-flight identifier set

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