Questions tagged [mediabrowserservicecompat]
65 questions
0
votes
0 answers
Android recyclerview getting massed up while updating from a callback from MediaBrowserServiceCompat controlled by handler
I am working with a MediaBrowserServiceCompat in my Android app and using a Handler to control the UI. I have implemented a Runnable that updates a TextView and a SeekBar every 200 milliseconds, and I am using a callback from the…

David Feldman
- 7
- 4
0
votes
1 answer
How to start a MediaBrowserServiceCompat in Automotive OS?
I am sending a notification from a worker that has an action which should open the media app. In other words, I want to start the MediaBrowserServiceCompat when the action is clicked. I tried this code:
val serviceIntent =…

Ahmed Sellami
- 17
- 6
0
votes
2 answers
Bluetooth Headset media buttons not working on Android using media2 nor media3
I'm building an app which needs to trigger an audio menu. For that purpose I need to intercept clicks on media buttons, specifically the play/pause button.
It is working fine using wired headsets and using the media button present in the…

nverinaud
- 1,270
- 14
- 25
0
votes
1 answer
Android Auto - click on list entry put nothing happens
I'm struggling with Android Auto using Desktop Head Unit Emulator.
So far I create my media app in Android Auto, start it and all media albums where shown.
However, when I click on an entry, nothing happens.
It is not clear to me how to catch the…

Alejandro Gomez
- 113
- 6
0
votes
0 answers
Implementing a MediaBrowserServiceCompat in a HeadlessJsTaskService
I'm working on a music player in my React Native app. I have a fully functioning player right now based on ExoPlayer 2.17.1 that is controlled by a MusicService class extending HeadlessJsTaskService().
The issue is that now I need to support Android…

arrakis90
- 318
- 2
- 13
0
votes
0 answers
How to resolve leak at androidx.media.MediaBrowserServiceCompat?
Leak is :
19583-19583/com.example D/LeakCanary:
┬───
│ GC Root: Global variable in native code
│
├─ android.service.media.MediaBrowserService$ServiceBinder instance
│ Leaking: UNKNOWN
│ Retaining 1.3 kB in 12 objects
│ this$0 instance of…

NickUnuchek
- 11,794
- 12
- 98
- 138
0
votes
1 answer
How can I change Media items in Android MediaBrowserServiceCompat
I am making an Android Auto based media player. I really have one page of media that can be played, but sometimes the titles of these items change. Lets say the first item says 'news of the hour for 12pm' and then it changes to 'news of the hour…

Uberbug
- 97
- 9
0
votes
1 answer
Best way to update seekbar in activity from a MediaBrowserService?
So I have a MediaBrowserServiceCompat() to play some audios with MediaPlayer, and one activity with the UI interface of the current media playing.
On this interface I have a progress bar that I would like to update with the current position of the…

Yoann Far
- 322
- 4
- 12
0
votes
1 answer
MediaBrowserServiceCompat stopped playing music when app goes background
Mediabrowsercompat not playing the music when app goes background. If I don't disconnect the mediabrowsercompat instance in activity onStop method then it is working. But that is not the solution as according to documentation we have to disconnect…

sum20156
- 646
- 1
- 7
- 19
0
votes
2 answers
Playing video's audio in background during screen off, android?
I have an application which uses exoplayer to play videos.
When the user is on player page and presses the power button to close the screen I want the audio to keep playing in the background and notification should be visible to user with controls…

WISHY
- 11,067
- 25
- 105
- 197
0
votes
0 answers
Keep Streaming service running over MediaBrowserService when Doze Mode
I am working on a Android Streaming App using MediaBrowserServiceCompat based on this great article https://medium.com/androiddevelopers/mediabrowserservicecompat-and-the-modern-media-playback-app-7959a5196d90. My app works pretty good except when…

limaho33
- 25
- 7
0
votes
0 answers
MediaButtonReceiver not working with MediaSession
I'm trying to receive media button events from Wired/Bluetooth headsets
I'm receiving media button events on onMediaButtonEvent(mediaButtonEvent: Intent?) method in MediaSessionCallback
but nothing happens to the music playback.
Here is my…

Dhiraj Borana
- 1
- 1
- 2
0
votes
0 answers
Videoview stealing mediabutton event when app has MediaBrowserService
I am using a Videoview to play an animation video in the loop. I noticed that whenever the video is playing if any other music app is playing audio and I click on headset buttons(pause/play), the media button events are not dispatched to the music…

Siju
- 2,585
- 4
- 29
- 53
0
votes
1 answer
Return type of onGetroot() method of MediaBrowserServiceCompat?
What is the first argument of BrowserRoot() which is a return type of onGetroot() in MediaBrowserServiceCompat.
Its first argument is rootId which is a string ,so do I pass the path of my album ? How I do get its value ? How do I return a content…

Ramu
- 147
- 1
- 13
0
votes
2 answers
onLoadChildren must call detach(), MusicBrowserService, Android?
I am using MediaBrowserService to play audio on the device.
When I turn on the bluetooth and play audio the app crashes.
Below is the logs
java.lang.IllegalStateException: onLoadChildren must call detach() or sendResult() before returning for…

WISHY
- 11,067
- 25
- 105
- 197