On-device AI features

Modern Android Mid-level Kotlin 2.0+ API 24+ Reviewed By Best Latest Apps

Order the steps

Order an on-device summarise feature.

  • Download the model if needed, showing progress
  • Run the request off the main thread and stream text
  • Check whether the summariser is available on this device
  • Show the result as an editable suggestion
  • Fall back or hide the feature where unsupported

Choose an answer, then open Show answer below to check it.

Show answer

Answer: C A B D E

  1. Check whether the summariser is available on this device It may be unavailable, downloadable or ready.
  2. Download the model if needed, showing progress Don't block the UI.
  3. Run the request off the main thread and stream text Shows progress quickly.
  4. Show the result as an editable suggestion Users stay in control.
  5. Fall back or hide the feature where unsupported Not all devices have Nano.

30-second answer

On supported devices, Gemini Nano runs through AICore, and ML Kit's GenAI APIs expose tasks like summarisation, proofreading, rewriting and image description. Check the feature's availability, download the model if needed, run the request off the main thread and stream results. Plan a fallback for devices without support, such as a cloud model or hiding the feature.

Practise saying it · 30 s. No recording, just a timer

Explain on-device AI on Android.

Say your answer out loud, then check which of these points you covered:

  • Gemini Nano via AICore
  • ML Kit GenAI APIs
  • Check availability
  • Stream off main
  • Fallback

Deep dive

On-device means no network and data stays on the phone.

Availability varies by device and region; always check status first.

Treat output as untrusted: show it as a suggestion users can edit.

Cloud models via Firebase AI Logic cover devices without Nano.

Common mistakes

  • Assuming every device has the model.
  • Blocking the UI while the model downloads.
  • Auto-sending AI output without review.

Senior take & follow-ups

Cover availability checks, streaming, fallback and treating output as a suggestion.

Follow-up questions

Think of your answer first, then open the hint.

  1. Why on-device?

    Show hint

    Privacy, offline use and no per-request server cost.

  2. What's your fallback?

    Show hint

    A cloud model or hiding the feature on unsupported devices.

Similar on iOS: On-device models with Foundation Models Apple's Foundation Models framework fills the same role on iOS.

Suggest a fix if something here is wrong or out of date.