mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00

When app is deployed with device's screen being off, MainActivity's onStart is called swiftly by its onStop. The onStop method cancels the browserFuture task which in turn "completes" the task. Upon task "completion", pushRoot() runs and then throws error as it calls get() a cancelled task. PiperOrigin-RevId: 492416445 (cherry picked from commit 64603cba8db9fbd9615e19701464c4d0734a86dc)
Media session demo
This app demonstrates use of media sessions. It's a reference app written in Kotlin, which demonstrates best practices for media apps that want to advertise media sessions.
See the demos README for instructions on how to build and run this demo.