dave08
11/11/2024, 12:24 PMMR3Y
11/11/2024, 1:25 PMMediaSessionService
https://github.com/mr3y-the-programmer/Podcaster/blob/ef9bdc5f74de8f24cd38f97fff35[…]p/src/main/kotlin/com/mr3y/podcaster/service/PlaybackService.kt
BTW, the app is on google play so you play with it to see if it fits your needs or take a look at the code directly
https://github.com/mr3y-the-programmer/Podcasterdave08
11/11/2024, 1:37 PMMR3Y
11/11/2024, 1:46 PMdave08
11/11/2024, 1:46 PMdave08
11/11/2024, 1:48 PMdave08
11/11/2024, 1:48 PMMR3Y
11/11/2024, 1:49 PMdave08
11/11/2024, 1:50 PMMR3Y
11/11/2024, 1:50 PMMR3Y
11/11/2024, 1:51 PMdave08
11/11/2024, 1:51 PMdave08
11/11/2024, 1:51 PMMR3Y
11/11/2024, 1:52 PMMR3Y
11/11/2024, 1:52 PMdave08
11/11/2024, 1:54 PMMR3Y
11/11/2024, 1:55 PMdave08
11/11/2024, 2:51 PMdave08
11/12/2024, 11:45 AMdave08
11/12/2024, 11:46 AMMR3Y
11/12/2024, 11:57 AMPlaybackService
specifically this line that attaches a listener https://github.com/mr3y-the-programmer/Podcaster/blob/ef9bdc5f74de8f24cd38f97fff35[…]p/src/main/kotlin/com/mr3y/podcaster/service/PlaybackService.kt then the actual synchronization happens when onMediaItemTransition
callback get called https://github.com/mr3y-the-programmer/Podcaster/blob/main/app/src/main/kotlin/com/mr3y/podcaster/service/ServiceMediaPlayer.kt#L98dave08
11/12/2024, 12:00 PMMR3Y
11/12/2024, 12:09 PMplay
function is for a different purpose, it is called when you explicitly click on a different episode's play button from the app's UI. honestly, I haven't tried removing the call from appstate play
and see if it will work with no issues but as per my understanding I thought that onMediaItemTransition
will be triggered when transitioning between the end of one episode and the beginning of a new one.MR3Y
11/12/2024, 12:10 PMMR3Y
11/12/2024, 12:13 PMonMediaItemTransition
gets called, there might be delay that will in turn cause the app's UI update to be delayed which the user might perceive as "unresponsiveness" or lagdave08
11/12/2024, 12:37 PMdave08
11/12/2024, 12:40 PMdave08
11/12/2024, 12:41 PMMR3Y
11/12/2024, 1:55 PMMR3Y
11/12/2024, 1:56 PM