open-standards/wai/examples/android-app
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 632f8cf394 wai: the developer's path, hello, create, dev and verify, a floor build with no system library, and nine examples
wai-rs gains the feature floor (the mandatory floor of SPEC 5: PNG, FLAC and
zstd, decoded with no system codec library) and quickstart (the floor, and the
receipt checks hello and verify run). The wai command line gains four verbs,
one module each, named in one table (dx::VERBS):

- hello: name, dispatch, rebuild and receipt on a picture made here, the
  receipt laid out as http-delivery 8 lays receipts beside an object;
- create: a new project from one of the examples, whose files the binary
  holds; tests/cli_dx.rs holds them to wai/examples/ byte for byte;
- dev: the relay, the room service and the room page on one loopback origin,
  as a production front serves them; --check checks each piece through it;
- verify: the receipt indexes under a directory, checked offline.

The project file a template writes, wai.json, is read in one place
(dx/project.rs). wai/examples/ holds video-room, watch-together, messaging,
encoder-ingest, package-and-deliver, verify-receipts, apple-app, android-app
and remote-desktop, each with a README and a test that runs it through
wai create and wai dev. wai/quickstart/ builds the room client and the
archive that holds wai, the relay, the room service, the remote host and the
packager.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 22:58:39 -04:00
..
replay wai: the developer's path, hello, create, dev and verify, a floor build with no system library, and nine examples 2026-10-26 22:58:39 -04:00
test wai: the developer's path, hello, create, dev and verify, a floor build with no system library, and nine examples 2026-10-26 22:58:39 -04:00
.gitignore wai: the developer's path, hello, create, dev and verify, a floor build with no system library, and nine examples 2026-10-26 22:58:39 -04:00
README.md wai: the developer's path, hello, create, dev and verify, a floor build with no system library, and nine examples 2026-10-26 22:58:39 -04:00
sample-session.json wai: the developer's path, hello, create, dev and verify, a floor build with no system library, and nine examples 2026-10-26 22:58:39 -04:00
settings.gradle.kts wai: the developer's path, hello, create, dev and verify, a floor build with no system library, and nine examples 2026-10-26 22:58:39 -04:00
wai.json wai: the developer's path, hello, create, dev and verify, a floor build with no system library, and nine examples 2026-10-26 22:58:39 -04:00

The native sink in Kotlin, for Android

What it shows. The WAI native sink's Kotlin API, the one an Android app calls. A recorded playback session goes through the sink call by call: each playlist verified against its receipt, each object against the hash its name states, the player's observations, its end. The sink signs an acknowledgement of what was received and, at the end, a bundle; the program verifies the bundle as the stream's owner does.

Run it. The sink is the wai-sink-android project of the WAI repository; build its host library once (JDK 17 and Rust), then point this project at it:

wai create my-android --template android-app
cd <your clone>/wai/wai-sink-android && scripts/build-native.sh host
cd my-android
export WAI_SINK_ANDROID=<your clone>/wai/wai-sink-android
gradle :replay:run          # Gradle 8.13, as the SDK pins it

What you see. How many playlists and objects went through the sink, and that the bundle verifies.

In an Android app. Build the SDK's AAR (scripts/gradle.sh :sink:assembleRelease, with the Android SDK and NDK) and give the player a WaiPlayerSession(context, url, config, WaiViewAttention(view)): the same calls, on the path of the player's requests. The SDK's README covers it.

With a coding assistant. Run wai setup-agent in this directory: it writes the instructions an assistant reads and connects it to WAI's tools.