Kostadin Arabadzhiev
Kostadin Arabadzhiev
A bit more context. Our app has been migrating to media3 for some time now and we are facing a weird issue with MusicServiceConnection when using dagger2 singleton injection. I'm...
Hello @marcbaechinger I've sent an email to [[email protected]](mailto:[email protected]) that includes the bugreport and also shell dumpsys media_session. Also I've noticed something in logcat, that I'm not sure will be obvious...
I'm doing it the same way as [UAMP in media3 branch](https://github.com/android/uamp/blob/ef5076bf4279adfccafa746c92da6ec86607f284/common/src/main/java/com/example/android/uamp/media/MusicService.kt#L224). I've also tried to use `player.pause()` before releasing it (line 243), but doesn't seem to make a difference. I...
> Are you using a controller in your activivty as well? Well in some ViewModels I have injected [MusicServiceConnection](https://github.com/android/uamp/blob/media3/common/src/main/java/com/example/android/uamp/common/MusicServiceConnection.kt) which has MediaBrowser inside. That's how I'm interacting with the media3...
> Yeah, that sounds like you solved the problem. When you release the session, the session will disconnect all browser/controllers and stopSelf should work. If by problem you mean the...
> An app must pause playback to get the service out of the foreground What do you mean by that? If we have released the browser/controller from Activity's onStop, then...
> You can call session.player.pause() I think. Yeah you're right, I got confused with similar situation, while testing different things yesterday, so I thought it will result in "controller not...
Looks like the issue is indeed the singleton scope in particular. I've [migrated my UAMP](https://github.com/android/uamp/commit/85d0f28c61a494b5d52c2b99c06abc19c7499753) fork to Hilt. My initial idea was to use `@ServicedScope` instead of `@Singleton`. However that...
I have similar issue as well. Updating toolbar margin instead of padding seems to work to certain degree, but then I get issues with shared element transitions.