How to use media3 Mediasession service with jetpack compose
I’m trying to implement media3 MediaSession and mediaController. I’ve created mediaservice as described in official documentation. as described in official documentation, I’m supposed to use use a lateinit var for mediacontroller and then initialize it listener for mediaControllerFuture in onStart function override. However my app is crashing and I’m getting error : lateinit property mediaController has not been initialized
. I’ve seen other code on stackoverflow they’ve implemented it same way but somehow its working for them.
Problem is that official documentation does not seem very helpful as it assumes many thing a developer to know already and most of the stuff it telss is more for xml layout than jetpack compose and I’m trying to develop in compose.