androidx / androidx/media

MediaLibrarySession.Builder#setSessionActivity does not work on Television API 34-36

Open
#2,989 4 comments 0 reactions 1 assignee View on GitHub

@marcbaechinger is already working on this.

Since Jan 7, 2026.

bug
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
  1. Start demo-session on Google TV emulator
  2. Select genre/Rock/Drop and Roll
  3. Move app to background
  4. 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 bugreport to android-media-github@google.com after filing this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.