explaingit

android/appfunctions

18KotlinAudience · developerComplexity · 3/5ActiveLicenseSetup · moderate

TLDR

Official Google sample showing how an Android app can publish actions like send-message or start-call through the AppFunctions API so the OS and on-device AI agents can invoke them.

Mindmap

mindmap
  root((appfunctions))
    Inputs
      Android Studio
      SDK 36
      Android 16 device
    Outputs
      ChatApp APK
      Registered AppFunctions
    Use Cases
      Send a message
      Search contacts
      Start a call
      Wire actions to agents
    Tech Stack
      Kotlin
      Jetpack Compose
      Hilt
      Gradle

Things people build with this

USE CASE 1

Copy the wiring pattern to expose your own app's actions to Android system intelligence and voice agents

USE CASE 2

Run the ChatApp sample to see send-message, search-contacts, and start-call actions registered via AppFunctions

USE CASE 3

Use this as a reference when migrating an existing chat or productivity app to the new AppFunctions API

USE CASE 4

Compare the sample's Hilt-based DI setup against your own Jetpack Compose app structure

Tech stack

KotlinJetpack ComposeHiltGradleAndroid

Getting it running

Difficulty · moderate Time to first run · 1h+

Needs Android Studio, SDK level 36 or higher, and a device or emulator running Android 16, older Android versions cannot run AppFunctions.

Apache 2.0 license, free to use, modify, and ship commercially with attribution and a patent grant.

In plain English

This is an official Android sample repository from Google that shows developers how to use a feature called AppFunctions. AppFunctions is an Android API that lets a regular app advertise some of its actions to the operating system and to AI agents that run on the phone. In practice, a chat app could tell the system that it knows how to send a message or start a call, and the system or a voice agent could then trigger that action without the user having to open the app and tap through screens. The repository ships one sample app called ChatApp. It is a working chat application written in Kotlin using Jetpack Compose for the user interface and Hilt for dependency injection. The sample exposes three concrete actions through AppFunctions: sending a message, searching contacts, and starting a call. The point is not to provide a finished chat product but to demonstrate the wiring needed to make those actions available to the wider Android intelligence layer. To try the sample, a developer needs Android Studio, the Android SDK at level 36 or higher, and a device or emulator running Android 16 or newer. After cloning the repository and opening the ChatApp folder in Android Studio, the standard Gradle sync, build, and run flow deploys it to the device. The code is released under the Apache 2.0 license. Contributions are accepted through pull requests after signing the Google Contributor License Agreement, with the Spotless tool used to enforce formatting and new functionality expected to come with unit or instrumentation tests. The README also points readers to the official AppFunctions developer guide on developer.android.com for a fuller overview of the API, and to a companion repository of AppFunctions Skills designed to speed up AI-driven development on top of the same primitives. Because the sample sits in the official android organization on GitHub, it is intended as a reference implementation that other app authors can copy patterns from rather than a library to depend on directly.

Copy-paste prompts

Prompt 1
Set up the ChatApp sample in Android Studio against an Android 16 emulator and run the send-message AppFunction
Prompt 2
Show me the exact Kotlin annotations and registration code this sample uses to declare an AppFunction
Prompt 3
Add a fourth AppFunction to ChatApp that creates a new chat group, including the schema, handler, and a unit test
Prompt 4
Wire the search-contacts AppFunction so it returns results to an on-device AI agent and explain the security model
Prompt 5
Compare AppFunctions in this sample against Android App Actions and tell me which one to use for a voice-assistant integration in 2026
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.