You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Chromecast HD on Android 14: current_app is always None (Google TV command greps mResumedActivity, renamed to topResumedActivity) #371
On a Chromecast HD running Android 14, AndroidTVSync.update() / current_app() always return None for the current app, so Home Assistant's media_player entity for the device never gets app_id, app_name or source.
The cause is in BaseTV._cmd_current_app(): the device matches the "Google Chromecast" special case (manufacturer contains "Google", model contains "Chromecast"), which selects CMD_CURRENT_APP_GOOGLE_TV. That command is dumpsys activity a . | grep mResumedActivity, and Android 14 renamed that line to topResumedActivity, so the grep matches nothing. The special case is checked before the Android 13/14 branch, so the generic CMD_CURRENT_APP13 (which works on this device) is never reached.
PR #368 ("Only use GOOGLE_TV constants for Android <14") fixes exactly this and has been open since 2025-11-30 without review. The corresponding Home Assistant report (home-assistant/core#153778) was closed as stale in 2026-02 without a fix. I am filing this so there is an issue to track it; happy to test a build.
Environment
androidtv 0.0.75 (the version pinned by Home Assistant), Python 3.14, adb_shell transport over TCP port 5555
Device: Google Chromecast HD, product_idboreal, Android 14, security patch 2025-10-01
dumpsys activity a . | grep mResumedActivity -> (nothing)
dumpsys activity a . | grep topResumedActivity -> topResumedActivity=ActivityRecord{... u0 com.limelight/.Game t13119}
dumpsys window windows | grep mCurrentFocus -> (nothing)
The same applies to _cmd_current_app_media_session_state(), which selects CMD_CURRENT_APP_MEDIA_SESSION_STATE_GOOGLE_TV for the same reason (..._STATE13 returns the app correctly).
make CMD_DEFINE_CURRENT_APP_VARIABLE_GOOGLE_TV grep for both spellings: grep -E 'mResumedActivity|topResumedActivity', which keeps the Chromecast path working on older and newer builds.
Activity