Skip to content

Small-snake/AppFunctions-Playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AppFunctions Playground

A tutorial-first Android demo that shows how a regular app can expose local capabilities through Android AppFunctions, making the app behave like an on-device MCP-style tool provider for agents.

AppFunctions is experimental. This project focuses on developer integration, KDoc metadata, local registration, and ADB verification. Full Gemini end-to-end access may depend on private preview availability and supported devices.

What This Demonstrates

  • Notes and reminders in a normal Compose UI.
  • The same workflows exposed as AppFunctions.
  • Agent-friendly KDoc with isDescribedByKDoc = true.
  • ADB commands for inspecting registered AppFunctions.
  • Security boundaries for narrow, non-destructive local functions.

Demo Media

First release media can start as screenshots. Recommended GIF flow:

  1. Create a note in the UI.
  2. Run adb shell cmd app_function list-app-functions.
  3. Show the registered functions for com.example.appfunctionsplayground.
  4. Show the same data visible in the app UI.

Requirements

  • Android Studio with Android SDK 37 support.
  • Android 16+ device or emulator for AppFunctions verification.
  • Android Gradle Plugin 9.1.0 or newer.
  • JDK 17 or newer. Android Studio's bundled JBR works.

The current AppFunctions 1.0.0-alpha09 artifacts require compileSdk 37 or newer.

Quick Start

From this machine, use Android Studio's bundled JBR and the cached Gradle distribution:

JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home" \
ANDROID_HOME="$HOME/Library/Android/sdk" \
GRADLE_USER_HOME="$PWD/.gradle-work" \
~/.gradle/wrapper/dists/gradle-9.4.1-bin/arn2x92ynaizyzdaamcbpbhtj/gradle-9.4.1/bin/gradle testDebugUnitTest

JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home" \
ANDROID_HOME="$HOME/Library/Android/sdk" \
GRADLE_USER_HOME="$PWD/.gradle-work" \
~/.gradle/wrapper/dists/gradle-9.4.1-bin/arn2x92ynaizyzdaamcbpbhtj/gradle-9.4.1/bin/gradle assembleDebug

You can also open the project directly in Android Studio and run the app configuration.

AppFunctions

  • createNote
  • searchNotes
  • createReminder
  • listReminders
  • generateChecklistFromNotes

ADB Verification

adb shell cmd app_function list-app-functions
adb shell cmd app_function list-app-functions | grep --after-context 10 com.example.appfunctionsplayground

Project Structure

app/src/main/java/com/example/appfunctionsplayground/
  appfunctions/   Agent-facing AppFunctions and serializable DTOs
  data/           Room entities, DAOs, and repositories
  demo/           Sample data seeding
  domain/         Deterministic checklist generation and range parsing
  ui/             Compose screens
docs/             Developer-facing guide docs

Docs

Roadmap

  • Add screenshots and a short demo GIF.
  • Add an AppFunction invocation transcript from a supported device.
  • Add deeper docs for generated AppFunctions metadata.
  • Add optional Expense domain after the tutorial path is stable.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages