MediaLibrarySession.Builder#setSessionActivity does not work on Television API 34-36
@marcbaechinger is already working on this.
Since Jan 7, 2026.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Version
Media3 1.9.0
More version details
No response
Devices that reproduce the issue
- Google TV Emulator Android 16 (system-images/android-36/google-tv/arm64-v8a)
Devices that do not reproduce the issue
- Google TV Emulator Android 13 (system-images/android-33/google-tv/arm64-v8a)
Reproducible in the demo app?
Yes
Reproduction steps
- Start demo-session on Google TV emulator
- Select genre/Rock/Drop and Roll
- Move app to background
- Try to open app from "Now playing" or from media notification
Expected result
Application comes foreground.
Actual result
App stays in background.
Log shows
2026-01-07 08:40:45.692 714-2167 ActivityTaskManager system_server E Background activity launch blocked! goo.gle/android-bal [callingPackage: androidx.media3.demo.session; callingPackageTargetSdk: 34; callingUid: 10102; callingPid: -1; appSwitchState: 1; callingUidHasVisibleActivity: false; callingUidHasNonAppVisibleWindow: false; callingUidProcState: FOREGROUND_SERVICE; isCallingUidPersistentSystemProcess: false; allowBalExemptionForSystemProcess: false; intent: Intent { xflg=0x4 cmp=androidx.media3.demo.session/.PlayerActivity }; callerApp: null; balAllowedByPiCreator: BSP.ALLOW_BAL; resultIfPiCreatorAllowsBal: BAL_BLOCK; callerStartMode: MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED; hasRealCaller: true; isCallForResult: false; isPendingIntent: true; autoOptInReason: null; realCallingPackage: com.google.android.apps.tv.launcherx; realCallingPackageTargetSdk: 36; realCallingUid: 10053; realCallingPid: 1694; realCallingUidHasVisibleActivity: true; realCallingUidHasNonAppVisibleWindow: false; realCallingUidProcState: TOP; isRealCallingUidPersistentSystemProcess: false; originatingPendingIntent: PendingIntentRecord{342a236 androidx.media3.demo.session startActivity (allowlist: 1989903:+30s0ms/0/NOTIFICATION_SERVICE/NotificationManagerService)}; realCallerApp: ProcessRecord{741bca3 1694:com.google.android.apps.tv.launcherx/u0a53}; realInVisibleTask: true; balAllowedByPiSender: BSP.ALLOW_FGS; resultIfPiSenderAllowsBal: BAL_ALLOW_VISIBLE_WINDOW; realCallerStartMode: MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED; balRequireOptInByPendingIntentCreator: true; balDontBringExistingBackgroundTaskStackToFg: true]
Media
genre/Rock/Drop and Roll
Bug Report
- You will email the zip file produced by
adb bugreportto android-media-github@google.com after filing this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.