The problem: it's all Kotlin, Jetpack, KSP and an XML schema. Nothing existed for React Native or Expo.
`// appfunctions.schema.ts
export const createNote = defineAppFunction({
id: 'createNote',
description: "Creates a note in the user's notes app with a title and an optional body.",
params: {
title: t.string('Short title of the note'),
body: t.string('Full text of the note').optional(),
},
returns: { id: t.string('ID of the created note') },
});
// appfunctions.handlers.ts
implementAppFunction(createNote, async ({ title, body }) => {
const note = await db.notes.add(title, body ?? '');
return { id: note.id };
});`
What works today (tested end to end on an Android 17 emulator):
A TS schema with fully typed handlers and runtime validation. Codegen produces the Kotlin, KSP builds it, and Android registers the functions.
Calls work when the app is open (about 30 ms) and when it's force-stopped.…