Building Android apps with AI: what runs on the phone?
There are two different ways to build an Android app with AI. A coding assistant can help you write and test the app without shipping any AI in it. An AI feature inside the app is different: you have to decide where it runs, what data it can see, and what happens when it is unavailable.
Start with one feature, not an agent team
Say you want a notes app to suggest a title for a note. Build the ordinary flow first: a person creates a note, types a title, and saves it. If you use a coding assistant, have it work on that small change and run the tests. Review what it changed before asking it to build the AI feature. Writing the app with an assistant does not make the app itself smarter.
For the title suggestion, start with one model call rather than a tool-using agent. Keep the suggestion editable and never replace a title the user has already written. Test blank notes, very long notes, and notes whose titles need to stay in another language.
Choose where the model runs
For on-device generation, Android’s Gemini Nano documentation explains how it works with AICore. Check Google's ML Kit GenAI documentation for the capability you actually need and its device requirements. The tool-using agent workflow is a separate preview with its own supported-device and developer-preview requirements. You do not need it to suggest one title.
If you choose a hosted model instead, keep the provider credentials on your backend. Make clear what leaves the device, and give the user a way to finish the task if the network or service is unavailable. Do not make an invisible cloud request as the fallback for a feature described as on-device.
Test the fallback before shipping
Try the feature on a supported phone, then on one without the model. Test a supported phone before the model is ready, and try again with the network off. In all cases, the user should still be able to edit the title and save the note. That is a more useful first milestone than adding another agent.