DownloadManager keeps remote downloads under Movies/KidsTube/ as .mp4, with
the folder path mirroring the remote library so a MediaItem.folder addresses
both; DashboardActivity is the screen that shows them.
The carousel under the player now scrolls sideways; the four visible slots keep
their meaning.
- Series.suggestionsFor takes a size: the first four slots stay
[outsider, previous, next, outsider], everything after them is a shuffled tail
of up to 24 entries, so swiping left and right keeps revealing random videos
- the tail is only appended when both end slots really carry a video from outside
the running series. Without that guard a series entry slid into position four as
soon as the tail existed, which is exactly what must not happen
- tests: long tail with the visible four intact, tail that mixes the series back
in, exhausted library, and the two edge cases that must stay short
19 Series tests + 5 store tests, 0 failures; assembleDebug and lintDebug green.
Built only — the tablet still runs the deployed build.
Stats, likes and thumbnail artwork now belong to the open folder instead of one
global store.
- Library.id(context) is the identity: the picked SAF tree, else the default
folder path
- StatsDb opens stats-<12-hex>.db derived from that id (StatsStore, pure and unit
tested), so a different folder has its own sessions, likes and export
- exports are stats-<tag>.json and carry a "library" field
- thumbnails live under filesDir/thumbs/<tag>/, so artwork never mixes between
folders
- MainActivity rebuilds its StatsDb when the library id changes; player and stats
screen always open the current one
- the single stats.db of earlier builds is copied once into the first library
that opens, so the existing history and like survive; other folders start empty
Built and tested locally only (21 unit tests, lint green) — the tablet still runs
the previous build because the child was watching.
Auto-advance follows the series instead of picking at random.
- next video = the next episode of the same folder, in numeric order
- at the end of a series: the first episode of another folder (random folder),
so the child never lands in the middle of an unfamiliar series
- a library with a single folder wraps to its own first episode; a single video
simply stops
- Series.nextToPlay is pure and unit tested with an injectable folder picker:
middle of a series, end of a series, wrap in a one-folder library, single video
(16 tests, 0 failures)
Not deployed: the child is still watching, so the APK was only built here.
The player's suggestion strip must offer something else at both ends, so the
row cannot read as "more of the same series".
- slots are now [outsider, previous, next, outsider]; an outsider is a video from
another folder than the running one
- when there is no second outsider the fourth slot stays empty instead of falling
back to the series
- neighbours keep their middle slots, so a series still continues in the middle
- tests cover 20 random runs for the end slots, the single-outsider case, a
single-folder library, and no-repeat of the current video (11 tests total)
Not deployed: the child is watching, so the APK was only built and tested here.
- The "All" pill shows a shuffled mix across folders instead of walking through
one series after another; a folder pill still keeps its numeric order.
- The five generated example clips (kinderlied, rennauto, traktor, elefant,
giraffe) are gone from the device, their MediaStore rows with them, and the
now-empty Autos/Tiere folders were removed.
Two lessons paid for during the cleanup, now in AGENTS.md:
- content delete on a media row deletes the file too. A broad name pattern took
seven real videos; they were restored from the host copies, renamed to ASCII
(fullwidth | and : prevented indexing even though the scan broadcast reported
success) and re-indexed.
- The tablet's USB link drops every minute or two, so the session now runs over
adb tcpip 5555 / adb connect <ip>:5555.
Verified on the device: 287 media rows (292 minus the five examples), no example
names left, first grid row mixes six different folders.
- Heart in the player now verifiably adds the video to "Your stuff": tapping it
on "002 - Meine Schmusedecke" produced two tiles there, newest first.
- Chrome timeout raised from 4s to 8s. At 4s a child (and every uiautomator dump)
lost the controls before reaching them; the tap now has a usable window.
- The tile-spacing test harness note: the heart sits at the top edge, so a dump
must happen within the visible window — measure right after the reveal tap.
Verified on the device this round: 3 columns filling their cells, readable in-tile
titles, "Your stuff" equal to the likes table (2 rows, 2 tiles), player chrome
reveal by tap, like toggle persisting to SQLite.
Three fixes from looking at the running app.
- Tiles take their full grid cell again. Sizing them from the available height
to force three rows made them half a cell wide, and the wide gaps read as a
zoomed-out page with tiny type. Full-width tiles, third row by scrolling.
- Tile title size now follows the tile height between 11sp and 17sp, with one
line on short tiles, so the type can never collapse.
- "Your stuff" listed the whole library: selectTab cleared the search field, the
watcher fired applyFilter("") and refilled the result list after the likes had
been submitted. The watcher now only acts on the search tab, and the field is
cleared before the tab's own list is submitted.
Verified on the device: grid is 3 columns filling the cells (22px gaps, titles
readable, confirmed by measurement and by reading the screenshot), and "Your
stuff" shows exactly the one liked video while the likes table holds one row.
The heart-toggle round trip is not re-verified yet: the tablet dropped off the
USB bus again before that tap sequence finished.
Rework the interface against the iPad kids screenshot and make landscape the
primary layout, since that is the orientation the child uses.
- dark canvas, red play logo + Kids wordmark, category pills (All + folders)
- four-tab bar Home / Search / Your stuff / Profile, shield + gear up top
- TileView draws the whole tile: rounded 16:9 frame, duration pill, two-line
title inside the image, heart when liked; tiles sized from the home grid
height so three rows of three fit without scrolling
- player offers four more videos as a single row in the lower third, ordered
[random, previous of the series, next of the series, random]; a finished
video rolls into another one instead of looping
- likes (heart in the player) feed "Your stuff"; empty states say so
- StatsDb records plays, watched time and per-day sums, mirrors them to
stats.json for an outside process; parent gate shows the summary
- thumbnails pick the brightest of three offsets, because openings fade from
black and left three of ten tiles empty
- Series ordering rules covered by unit tests (9 tests, JVM only)
Verified locally: assembleDebug, testDebugUnitTest, lintDebug all green.
Device verification of the new grid, likes and stats screen is pending: the
tablet dropped off the USB bus (adbd crash-loop) before the last two builds.
Scaffold and first working build of an Android app that reproduces the iOS
YouTube Kids interface over a local folder: shelves of 16:9 rounded
thumbnails, fullscreen player, bottom bar, search grid and a parent gate.
- minSdk 21, AGP 8.13.2 / Gradle 8.13 / Kotlin 2.1.20, compileSdk 35
- library from Movies/KidsTube via MediaStore, or a SAF tree the parent picks
- no INTERNET permission: verified against the built APK with aapt2
- thumbnails decoded once into filesDir and cached, never on the bind path
- player: VideoView, immersive, chrome auto-hides, tap_catcher restores it
Verified on the AGS2-W09 (API 30): shelves with real frames, playback,
search filtering, parent gate, back navigation.