AutoPlakáty shows ads on Android tablets in cars around Prague. Advertisers send in their material, it goes into playlists, and the tablets show it to passengers all day.
A car drives through bad signal all the time, and the one thing the screen must not do is go blank. So the player is built on one rule: the network is only for getting updates. Playing never needs it.
A full copy on every tablet
The player is a native Kotlin app running in kiosk mode. Every tablet keeps a full local copy of its active playlist, and playback only reads from that copy. With no signal it just keeps going. If the app crashes or the tablet reboots, it starts itself again.
An update goes like this:
- A playlist changes and the affected tablets get a push.
- The tablet fetches the new manifest.
- It downloads any new media to local storage while the old content keeps playing.
- It switches over only when every file is there.
Push is not enough
Firebase push gets an update out fast, but it isn't guaranteed, least of all to a tablet in a low-power state. So the tablets also poll in the background. Polling is the baseline and push is the fast path. A lost push means the playlist is out of date until the next poll, and nothing worse.
Test on the real tablets
Locking an Android device to one app needs the device management APIs, and getting kiosk mode reliable across the different tablets in the fleet took code that depends on the Android version. An emulator behaves differently from a real tablet, so I tested on the actual devices from the start.
