Cefrium demo - automotive IVI
The radio keeps playing while you drive the map
Real SomaFM radio and the real OpenStreetMap map, side by side on native Android -- and the music never stops when you switch between them. That is harder than it sounds, and with the real sites it is something the Android System WebView cannot do.
Why this is a big advantage
A real car keeps the radio on while you look at the map. On Android, doing that with real web content runs into a wall:
- A single web view can't do it. Navigating the one view from the radio page to the map tears the radio page down -- the audio stops. That is what the System WebView gives you.
- You can't iframe the real sites.
somafm.comandopenstreetmap.orgboth sendX-Frame-Options: SAMEORIGIN, so "keep the radio page mounted in a hidden frame" is not an option for the real sites. - So you need two live engines. The only correct way to keep the real radio site playing while the real map renders is to run two browser instances and switch which one is on screen -- exactly how a real car keeps its media service running independently of the foreground app.
Cefrium runs those two Chromium engines on native Android and lets the app
control their lifecycle -- the media engine stays alive in the background
while the map engine renders. The System WebView is a single instance per
view with no such control. That is the advantage: the full
Chromium engine, on the real sites, with the multi-engine background-media
behaviour a real product needs.
Built with the kiosk-automotive-v2 sample. The "Chromium 149" label in the app is read from the engine's user-agent at runtime, so it is always truthful.