BufferedTV for Android: an unofficial PeerTube client for Android phones and tablets. https://buffered.tv/android
  • Kotlin 99.2%
  • Shell 0.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ric Harvey 56af4ca60c
All checks were successful
Android / Test, lint and build the APK (push) Successful in 6m5s
Every build from main goes on a rolling latest pre-release
A build only reached the Releases page from a version tag, so pushes to
main left their APK with the run alone. Now each push replaces the debug
APK on the "latest" pre-release, and a v* tag still makes its own
release, with the debug APK beside an unsigned release APK until the key
is in the secrets. scripts/publish-release.sh does both. Nothing is sent
to a store.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 22:46:07 +00:00
.forgejo/workflows Every build from main goes on a rolling latest pre-release 2026-11-17 22:46:07 +00:00
app Downloads, background sound, foldables, system captions and links 2026-11-17 22:38:49 +00:00
gradle Downloads, background sound, foldables, system captions and links 2026-11-17 22:38:49 +00:00
scripts Every build from main goes on a rolling latest pre-release 2026-11-17 22:46:07 +00:00
.gitignore Downloads, background sound, foldables, system captions and links 2026-11-17 22:38:49 +00:00
build.gradle.kts BufferedTV for Android phones and tablets 2026-10-08 23:15:10 +01:00
gradle.properties BufferedTV for Android phones and tablets 2026-10-08 23:15:10 +01:00
gradlew BufferedTV for Android phones and tablets 2026-10-08 23:15:10 +01:00
gradlew.bat BufferedTV for Android phones and tablets 2026-10-08 23:15:10 +01:00
LICENSE BufferedTV for Android phones and tablets 2026-10-08 23:15:10 +01:00
PRIVACY.md Downloads, background sound, foldables, system captions and links 2026-11-17 22:38:49 +00:00
README.md Every build from main goes on a rolling latest pre-release 2026-11-17 22:46:07 +00:00
settings.gradle.kts BufferedTV for Android phones and tablets 2026-10-08 23:15:10 +01:00

BufferedTV for Android

An unofficial PeerTube client for Android phones, tablets and televisions. Free, open source, and built with ❤️ by Ric Harvey, supported by SquareCows.

One app, and one APK, runs on all of them: phones and tablets, and Google TV, Android TV and Fire TV with a remote control.

This is the Android companion to BufferedTV for Apple TV and BufferedTV for iPhone and iPad, with the same features rebuilt in Kotlin and Jetpack Compose. It lives at buffered.tv.

What is PeerTube?

PeerTube is video hosting that nobody owns. Instead of one company running one enormous site, thousands of independent servers, called instances, host their own videos and share them with each other. No algorithm deciding what you see, no adverts, no company.

What it does

  • Browse any instance. Trending, recently added, live now, top rated and local videos, with a full grid behind every shelf.
  • Search the whole network. Searches every public instance through SepiaSearch by default, and plays what it finds wherever it lives.
  • Sign in, or don't. Subscriptions, playlists, Watch Later, history and continue watching, with two-factor sign-in. Or browse anonymously.
  • Watch properly. Each video has one page: the player at the top, with full screen, picture in picture, subtitles, audio tracks and speed, and quality pinned to the best the instance published. Turn a phone sideways and the video fills the screen.
  • Watch offline. Download a video from its page, at about the quality it plays at, with its subtitles, and it plays with no connection. Downloads wait for Wi-Fi unless you allow mobile data, carry on with the app closed, and are deleted 30 days after they finish unless you change that, or turn it off, in Settings. Open the app offline and it goes straight to your downloads; online, they are a shelf in the Library. The app honours an uploader's choice to turn downloads off.
  • Keep listening. The sound carries on with the screen off or another app in front, with the video in the notification shade and on the lock screen. Closing picture in picture stops it, and it can be turned off in Settings.
  • Have your say. Like or dislike, subscribe to the channel, save to Watch Later in one tap or to any playlist, share, and read, write and reply to comments.
  • Subtitles in your language. Point it at a LibreTranslate server and it translates a video's subtitles while you watch. With captions turned on in Android's accessibility settings, subtitles come on by themselves, in your language where there's a choice and a person's before a machine's.
  • Your feed, your way. Block an account or a whole server and it disappears everywhere, comments included. Report anything worse to the moderators.
  • Parental controls. Sensitive videos are hidden until you choose otherwise. Set a parental PIN and changing that needs it, or choose Ask for the PIN to enter it before each sensitive video plays.
  • Phones and tablets. A bar along the bottom on a phone, a rail down the side on a tablet, and a watch page that puts more from the channel in a second column when there is room for one.
  • Foldables. Stand a foldable up like a laptop and the video plays on the upper half, with play, pause, skip and a scrubber on the lower one above the details and comments. Hold it like a book and the video and its details take one side of the crease, the comments and the channel's other videos the other.
  • Links. bufferedtv://video/<host>/<id>, bufferedtv://channel/<name@host> and bufferedtv://tab/<section> open the app there, as the iPhone and Apple TV apps do. A link that arrives before an instance is chosen waits for one.
  • Televisions. On Google TV, Android TV and Fire TV everything is reached with the remote's arrows. Whatever has the focus wears a bright ring, a video opens filling the screen with the player's controls under the remote, and Back steps out to the video's page and then to the list it came from, with the focus where it was left.
  • Nothing is tracked. No analytics, no adverts, no third-party code, and no server of ours. See the privacy policy.

Not in this version

Things the iPhone and iPad app does that this one doesn't:

  • Watching together over a call. SharePlay has no Android counterpart that can join an iPhone or Apple TV group, and Google's own options need Play Services, which this app doesn't use and Fire TV doesn't have.
  • Settings that follow you between devices. Android has no live key-value sync like iCloud's without Play Services.
  • Leaving out search results from servers the device can't reach.
  • Siri and Shortcuts, and the device's age range for sensitive videos.

Downloads and background sound are for phones and tablets; on a television the app streams, as the Apple TV app does.

Requirements

Android 7.1 (API 25) or later, which takes in Fire OS 6, 7 and 8: every Fire TV stick and box from the 2018 Fire TV Stick 4K onwards. Nothing older trusts the certificates most PeerTube instances use. The app is built against Android 17 (API 37) and targets Android 16 (API 36).

Televisions

The same APK installs on a television; there is no separate build. To put it on a Fire TV or a Google TV device, turn on installing from unknown sources (or developer options and ADB debugging) on the device, then either send the APK over with an app made for that, or from a computer on the same network:

adb connect <the device's address>
adb install BufferedTV.apk

It then appears among the device's apps under its own banner.

How it behaves there: the app decides once, as it starts, whether it is on a television (AppModel.isTelevision). On one, pages take the focus as they open, text fields wait for OK before raising the keyboard, cards grow under the focus, and picture in picture is left out.

Building

You need a JDK (17 or later; the one inside Android Studio works) and the Android SDK with platform 37 and build tools 36.1.0. Point local.properties at the SDK:

sdk.dir=/path/to/android/sdk

Then:

./gradlew :app:assembleDebug        # a development build
./gradlew :app:testDebugUnitTest    # the unit tests
./gradlew :app:lintDebug            # Android lint

The development build installs beside the release one, as com.squarecows.bufferedtv.debug.

Working against a local PeerTube

Release builds only ever speak HTTPS. A development build will also talk plainly to a PeerTube on your own machine, so sign-in, comments and the rest can be tried without touching a real instance. With one listening on port 9000:

adb reverse tcp:9000 tcp:9000

and enter localhost:9000 as the instance address. From the emulator, 10.0.2.2:9000 works without the adb reverse.

Release builds

A release is signed with a key that is kept outside this repository. The build looks for ~/.bufferedtv-android/keystore.properties (or the file named by BUFFEREDTV_KEYSTORE_PROPERTIES):

storeFile=bufferedtv-release.jks
storePassword=...
keyAlias=bufferedtv
keyPassword=...

storeFile is taken from the folder the properties file is in. Then:

./gradlew :app:assembleRelease

writes app/build/outputs/apk/release/app-release.apk, shrunk and optimised. Without the properties file the APK is built unsigned.

Keep the key and its passwords backed up somewhere private, and never commit them. Android only installs an update over an existing copy of the app when it is signed with the same key.

On the CI

.forgejo/workflows/android.yml runs on the sqcows runner for every push to main and every pull request: the unit tests, Android lint, and the debug APK, which is kept with the run as BufferedTV-APK, with the lint report beside it. The build runs in an eclipse-temurin:21-jdk container through scripts/ci-build.sh, which fetches the Android SDK the first time and keeps it, and Gradle's downloads, in ~/.cache/bufferedtv-android on the runner.

Each push to main also replaces the APK on the latest pre-release, so the newest build is always on the Releases page. Pushing a tag such as v1.3.0 also builds the release APK and attaches it to a release of that name. Nothing is sent to a store. It is signed when the repository has these secrets, and unsigned otherwise:

Secret What it is
ANDROID_KEYSTORE_BASE64 The release keystore, as base64 -w0 bufferedtv-release.jks prints it
ANDROID_KEYSTORE_PASSWORD Its password
ANDROID_KEY_ALIAS The key's alias, bufferedtv
ANDROID_KEY_PASSWORD The key's password

The script runs the same anywhere with a JDK: ./scripts/ci-build.sh, with RELEASE=1 for the release APK too.

How it is put together

app/src/main/java/com/squarecows/bufferedtv/
  core/          the instance, the account, feeds and formatting
    model/       PeerTube's JSON, as Kotlin
    net/         the HTTP layer, the PeerTube client, the search index
    store/       settings, blocks, the parental PIN, downloads, the encrypted store
  nav/           the sections and the pages opened within each
  playback/      what to play for a video, the player, the watch page's model,
                 and the services for background sound and for downloads
  ui/            Compose: theme, shared parts (focus and remote control in
                 components/Focus.kt), and one file per screen

Everything the app is built from comes from two places: Google's AndroidX libraries (Compose, Material 3, Media3) and JetBrains' Kotlin libraries (coroutines, serialization). The HTTP layer is the platform's own HttpURLConnection, pictures are loaded by a few dozen lines in RemoteImage.kt, and sign-in tokens are sealed with a key in the Android Keystore. There is no analytics or crash reporting library, and nothing that talks to anyone but the instances you use.

Before a public release

  • The privacy policy at buffered.tv/privacy, which the app links to, should say what PRIVACY.md says about Android.
  • "Help and support" in Settings opens the Apple TV app's issue tracker, as the other apps do, until this repository is public.

Licence

MIT. See LICENSE.

PeerTube is a trademark of Framasoft. This app is not affiliated with the PeerTube project.