stream audio from your android device to airplay speakers.
main interface • active streaming • settings
started as a way to breathe new life into a bang & olufsen beosound century - a beautiful 1990s hi-fi system with stunning sound quality but no wireless capabilities. by adding a raspberry pi running shairport-sync, the century can now receive airplay streams.
centuryplay completes the chain by letting android devices stream system audio to shairport-sync (or any airplay receiver), effectively turning a vintage b&o system into a modern wireless speaker.
- system audio capture: stream any audio playing on your device.
- auto discovery: automatically find airplay devices via mdns/bonjour.
- encrypted streaming: aes-128-cbc encryption with rsa key exchange.
- synchronized playback: proper rtp timing and sync packets.
- volume control: adjust volume on the receiver.
- music player integration: now playing metadata and controls.
yes. when playing apple music (or any other source) on android, this app captures the audio and streams it over airplay. however, there are caveats regarding android's audio pipeline.
| source | android behavior | stream output |
|---|---|---|
| 44.1 khz (cd quality) | no resampling | bit-perfect |
| 48 khz | native | bit-perfect |
| 96 khz hi-res | resampled to 48 khz | downsampled |
| 192 khz hi-res | resampled to 48 khz | downsampled |
key points:
- android's mixer typically runs at 48 khz.
- hi-res content is downsampled by android before reaching this app.
- airplay 1 only supports 44.1 khz, so additional resampling may occur.
- for true bit-perfect playback, exclusive usb audio mode would be required.
bottom line: excellent quality, but not bit-perfect hi-res. cd quality (16-bit/44.1khz) is handled cleanly.
| protocol | status | notes |
|---|---|---|
| airplay 1 (raop) | working | l16 pcm audio, encrypted |
| airplay 2 | in progress | coming soon |
- android 10 (api 29) or higher.
- airplay-compatible receiver (e.g. shairport-sync, apple tv, homepod, airport express).
-
clone the repository:
git clone https://github.com/g8row/centuryplay.git cd centuryplay -
build with gradle:
./gradlew assembledbug
-
install the apk:
adb install app/build/outputs/apk/debug/app-debug.apk
download the latest apk from the releases page.
- grant permissions: requires audio recording permission for capture.
- start media: play audio/video on your device.
- select device: tap an airplay device from the list.
- allow capture: approve the screen/audio capture prompt.
- stream: audio will play through your airplay speaker.
uses android's audioplaybackcapture api to capture system audio, then streams it to airplay receivers using raop (remote audio output protocol).
┌─────────────┐ ┌──────────────┐ ┌────────────────┐
│ android │────▶│ airplay │────▶│ airplay │
│ device │ │ streamer │ │ receiver │
│ (audio) │ pcm │ (this app) │ rtp │ (speaker) │
└─────────────┘ └──────────────┘ └────────────────┘
- audio format: l16/44100/2 (16-bit pcm, 44.1khz, stereo).
- transport: rtp over udp.
- control: rtsp over tcp (port 5000).
- encryption: aes-128-cbc with rsa-oaep key exchange.
- timing: ntp-style timestamps with sync packets.
see docs/airplay_protocol.md for detailed protocol documentation.
| receiver | protocol | status | notes |
|---|---|---|---|
| shairport-sync v4.x | airplay 1 | working | recommended |
| shairport-sync v3.x | airplay 1 | working | |
| airport express | airplay 1 | working | |
| apple tv (gen 2-3) | airplay 1 | working | |
| apple tv 4k | airplay 2 | requires airplay 2 | in development |
| homepod / mini | airplay 2 | requires airplay 2 | in development |
| airscreen (android) | airplay 1 | issues | compatibility variations |
- drm content: some apps block capture (netflix etc).
- latency: inherent ~2s buffer latency.
- music player integration: real-time metadata (title, artist, art) and controls.
- ui polish: minimal aesthetics, lowercase typography, neutral status indicators.
- settings: keep screen on, auto-connect, and layout fixes.
- technical: project configuration updated for stable release.
- wavy volume slider.
- material 3 theming.
- connection monitoring.
- crash fixes.
- initial release.
- airplay 1 (raop) support.
- mdns device discovery.
- encrypted audio streaming.
see development.md for notes.
- language: kotlin
- ui: android views (viewbinding)
- architecture: mvvm + stateflow
- concurrency: coroutines + flow
- networking: raw sockets, jmdns
- crypto: bouncycastle
contributions welcome. submit a pull request.
mit license. see license file.
disclaimer: airplay is a trademark of apple inc. this project is not affiliated with apple inc.


