The release workflow and the Docker build install build-tools 36.0.0, as
docs/android.md asks, but AGP 8.13 wanted its default, 35.0.0: it
installed that one itself where the SDK licences were accepted, and
elsewhere the build stopped. app/build.gradle.kts now pins 36.0.0, and
the debug APK (arm64-v8a and x86_64) builds with an SDK that has only
platform 36, build-tools 36.0.0 and the NDK 27.3: the Gradle 8.14.3
wrapper on Temurin JDK 17, Kotlin without warnings.
docs/android.md had none of this wave: the voice notification as the
app's voice card (Mute, Deafen, Leave, tap to open the voice screen), the
live stream's notification, the screen drawn straight into the encoder's
input surface and the reader for simulcast, the app picker with icons,
Camera2 cameras with the CAMERA permission, Share to Voelin, what was
tested where (the Rust sides, headless screenshots, compile-only parts),
a known gap (no camera foreground service) and how to try it on Waydroid.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Screen sharing went MediaProjection -> ImageReader -> an owned Vec per
frame -> RGBA to NV12 on the CPU -> MediaCodec's input buffers: two
copies and a conversion of every frame on a phone's CPU.
Now, while it is the only MediaCodec encoder in the process (one
simulcast layer, one codec), an encoder takes GpuFrames: for the first
it starts a codec with an input surface (COLOR_FormatSurface,
max-fps-to-encoder at the stream's rate, repeat-previous-frame-after so
a still screen answers keyframe requests) and publishes it, and the
capture points its virtual display at that surface, resized to the
layer's size. The compositor renders the screen into the encoder; a
ticker at the stream's rate hands the sink GpuFrames that only collect
what the codec encoded, on the capture's timeline.
Simulcast keeps working by falling back: a second encoder (another
layer, or another codec a viewer chose) turns the path off for every
encoder and the display goes back to the reader, until it is the only
one again. One display can only render into one surface, and a GL
fan-out to several encoder surfaces is a lot of code for a case phones
rarely need. An encoder whose surface fails stays on frames in memory.
The fallback path no longer copies either: the provider's start_sink
hands the reader's buffer to the stream's sink borrowed. A frame-rate
change restarts the surface codec (its cap is fixed when it starts),
and the display is detached while it is resized, so neither consumer
sees a picture of the other's size.
Compiled for aarch64-linux-android only: there is no device here, so
frames per second and CPU use are not measured.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The phone had no way to choose which apps a stream carries: the
studio's audio picker added one source and closed, and Android's app
list had names only. The picker now marks what is mixed in already
(stream.audio_sources) and switches a source on or off with a tap, so
several apps (and the microphone, desktop audio, test tones) are picked
in one go; Done closes it. Android's launchable apps come with their
icons: Kotlin draws each app's icon once per installed version into a
96 px PNG in the cache and hands over its path (AudioApp::icon), which
the picker shows. The shared window's audio is not offered on Android,
which shares the whole screen.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The studio listed only the test pattern on Android. voelin-media gains a
camera provider hook (like the external screen capture): the app
registers Camera2, whose cameras the studio's picker lists first (front
ones first, with their YUV sizes and highest frame rate), and a camera
source opens one. CameraCapture.kt asks for the CAMERA permission when a
camera is first opened (the source shows why if it is refused), opens
the camera into an ImageReader (YUV_420_888) at the wished size or the
nearest one (16:9 first, 1280x720 by default) with a fitting frame-rate
range, and hands each frame's planes to Rust as direct buffers valid
during the call, with the clockwise turn that makes it upright for the
screen's current rotation (front cameras turn the other way).
Rust takes the planes as YuvPlanes: an upright planar or NV12 picture
goes to the studio's sink as it is, converted straight from the
camera's memory; NV21 (what most cameras give) and turned pictures are
gathered into I420 in a buffer each camera keeps, so a running camera
allocates nothing per frame. Errors after the start (permission refused,
camera taken by another app) go to the source's feed.
Front and back: a camera's default mirroring now follows the camera (a
back camera is not mirrored, what faces the user is), and the source
menu gains Switch camera, which moves a camera source to the next
camera (and its name with it, if it was named after the camera).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Other apps could not hand anything to Voelin. The activity now takes
ACTION_SEND and ACTION_SEND_MULTIPLE of any type. Text and links go into
the composer of the current chat, which the phone then shows: one tap
sends them, and a mis-tap in the share sheet does not post into a busy
channel. Files are copied out of the sending app while its content URIs
are readable (on a thread of their own, under the name the app gives,
made safe as a path component) and uploaded to the current chat's
channel, or the channel we are in, and linked there as the composer's
attach button does. The copies live in the cache and are removed at the
next start.
Two development switches show both platform requests without a phone:
VOELIN_OPEN=notification (a tapped voice notification) and
VOELIN_OPEN=shared:<text>.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The voice service's notification said "In voice on <server>" with Mute
and Disconnect, and the screen-sharing one only "Sharing your screen".
The voice notification now shows what the app's voice card shows: the
channel as its title, the server and how many are there ("Home · 3 in
voice", "just you"), the time in voice as a chronometer, and Mute,
Deafen and Leave, which act on every voice session as the old Mute did.
Several servers at once read "In voice on 2 servers" with their names.
Tapping it opens the voice channel screen (the activity forwards the
action to Rust, which queues it until the window runs). While our
stream is live the screen-sharing notification says where it goes and
how many watch ("Live in Chill Zone", "Home · 2 watching"). Both use
the app's accent colour.
The window takes such platform requests through a small inbox in
voelin-ui (`voelin_ui::request`), handled on the window's thread and
outside the app's borrow, since navigating calls back into Rust.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ScreenCaptureService now keeps any number of AudioPlaybackCapture
recordings by id instead of a single one. Each matches media, game and
unknown usages, and either the uid of one app (addMatchingUid) or every
uid but ours (excludeUid), so a shared screen no longer carries our own
voices and watched streams. Recording 0 still feeds
Native.onSystemAudio; the others feed Native.onAudioInput(id, ...), which
goes to the stream mixer's inputs.
Bridge gains startAudioInput(id, package or null), which maps the
package to its uid, plus stopAudioInput(id) and launchableApps(). The
manifest declares a launcher-intent <queries> so those apps and their
uids are visible on Android 11+.
Compiled with gradlew compileDebugKotlin. javap shows the JNI
signatures match crates/voelin-android/src/bridge.rs. Not run on a
device.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
The product is Voelin (app id io.github.faumaray.Voelin), everywhere:
- crates tsc-* -> voelin-* (and voelin-fuzz), the desktop binary
tsc-desktop -> voelin, the development CLI tsctl -> voelinctl;
- the Android app: applicationId, Kotlin package io.github.faumaray.voelin,
VoelinApp, libvoelin_android.so (JNI class names follow);
- TSC_* environment variables -> VOELIN_*, Gradle properties tsc.* ->
voelin.*, signing secrets VOELIN_SIGNING_*;
- the data/config/cache/state folder tsc -> voelin, the keyring service,
thread names, the dev compose project;
- desktop file, metainfo, icon, Flatpak manifest, NSIS installer, docs.
The gateway keeps its name: bin tsgw (crate voelin-gateway), TSGW_* env
vars, the tsgw.v1+json protocol, the tsgw image. The window title and the
About page show "Voelin <version>" from voelin_platform::APP_NAME.
Packages (scripts/package.sh): the app only (voelin, voelin.exe, APKs,
Flatpak). voelinctl is a development tool and in no package. tsgw is for
servers and now its own Linux package, tsgw_<v>_amd64.deb and
tsgw-<v>-linux-x86_64.tar.gz, with a sandboxed systemd unit
(packaging/linux/tsgw.service; /etc/tsgw config, /var/lib/tsgw state) and
dependencies of its own (no GUI libraries). docs/gateway-admin.md has an
Install section.
Fixes:
- package-windows: makensis on Windows found no file through "D:/a/..."
paths; pass Windows paths (cygpath -w).
- StartupWMClass is the app id, which the app sets as its X11 WM_CLASS
(it was the binary name, so desktops could not match the window).
- Gradle wrapper download timeout 10 s -> 60 s (slow proxies).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G