Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Exploring Android 16: App Functions

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →

Exploring Android 16: App Functions

Android 16 is just about here, and with it comes an interesting new feature - App Functions. What are App Functions, what are they for, and how do I use them? In this session we'll dive into the framework changes in Android 16, the un-published AndroidX libraries, and try to build something that uses this mysterious new functionality.

Jamie Sanson is a Google Developer Expert for Android. In his spare time he likes to build things - from apps, to mechanical keyboards, to brewing systems - and photographs anything and everything. Jamie is currently working as a Staff Software Engineer in the Apps Platform team at Marks and Spencer.

Leeds Mobile

June 04, 2025

Transcript

45 slides
  1. Agenda App Functions - what are they? – Building an

    App Function – Calling an App Function – What are they for? – Predictions –
  2. An app function is a piece of functionality that apps

    expose to the system for cross-app orchestration.
  3. App Function packages appfunctions: backwards compatibility? – appfunctions-compiler: annotation processing

    is involved – appfunctions-service: seems to be a separate runtime library –
  4. The [appfunctions.metadata] package de6nes a set of classes to represent

    metadata for AppFunctions. This metadata is designed to be similar in spirit to the OpenAPI speci6cation, which is used to describe REST APIs. 1 https://cs.android.com/androidx/platform/frameworks/support/+/androidx- main:appfunctions/appfunctions/src/main/java/androidx/appfunctions/metadata/README.md 1.
  5. App Function metadata No HTTP-related things like response codes –

    Metadata is stored in AppSearch – Metadata originates in your APK – Common, versioned “schemas” –
  6. What the code tells us Apps include “functions” – Functions

    have request/response modelling – Requests & responses form function metadata – Codegen will make writing functions easier –
  7. // in settings.gradle.kts dependencyResolutionManagement { repositories { google() mavenCentral() +

    maven { + url = uri("https://androidx.dev/snapshots/builds/ <build-number>/artifacts/repository") + } } }
  8. // in settings.gradle.kts dependencyResolutionManagement { repositories { google() mavenCentral() maven

    { url = uri("https://androidx.dev/snapshots/builds/<build- number>/artifacts/repository") + content { + includeGroup("androidx.appfunctions") + } } } }
  9. AndroidX AppFunctions KSP plugin – @AppFunction – A bound Service

    – Various other things (schema, serialization annotation) –
  10. App Functions and function calling Function de+nitions from AppSearch –

    Serviced using EXECUTE_APP_FUNCTIONS – Your app is a set of tools –
  11. Conclusions App Function are better Intent s – You can

    build them – You can’t call them – Their use-case is probably AI, but could be used in isolation –

More Decks by Leeds Mobile

Other Decks in Programming