androidengineers.Book a session

Compatibility and model readiness

Compatibility and model readiness

articleSelf-paced

Design for devices where the feature cannot run.

1. Capability checks

Use the supported availability checks for the selected API. OS version alone does not establish hardware or model readiness. Check the feature rather than guessing from a device brand.

2. Download states

A supported model may still need downloading. Surface progress or retry guidance and handle low storage, network interruption and user cancellation. Keep the manual feature available.

3. Resource ownership

Create and close model clients according to the API lifecycle. Avoid repeated setup during recomposition and release resources when the owner no longer needs inference.

Worked scenario

A compatible phone has no downloaded model while offline. Report the missing model instead of showing an endless generation spinner.

Apply it

Implement a readiness state machine with a fake capability provider. Test unsupported, downloadable, ready and failed states.

Check your understanding

Unsupported hardware and temporarily unavailable model data produce different user guidance. Explain the decision and show evidence from your implementation or design. If you cannot demonstrate it yet, revisit the relevant section before continuing.

YOUR LEARNING JOURNEY

0 of 13 available lessons completed

Progress saved in this browser. No account needed.
Compatibility and model readiness | Gemini Nano + ML Kit GenAI | Android Engineers