Questions tagged [mediabrowserservicecompat]
65 questions
2
votes
3 answers
MediaBrowserCompat.connect() never calls onConnected or any MediaBrowserCompat.ConnectionCallback method
I am trying to connect my activity to a MediaBrowserServiceCompat service using MediaBrowserCompat.
This is my activity:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
…

Leo300
- 163
- 1
- 1
- 10
1
vote
0 answers
How to control music playback on the phone from WearOS watch
I want remote control phone music playback from WearOS watch just for play/pause/next/previous as system app does.
I have google a lot, building a media browser client in WearOS app looks right to implement this.
val comp =…

Haozes
- 352
- 2
- 12
1
vote
0 answers
On Android 11 setMediaSession on Notification then call stopSelf won't trigger onDestroy in MediaBrowserServiceCompat
I've tried to scope down the code as much as possible to identify the problem (although may have missed some pieces) but essentially I'm having an issue that occurs for Android 11 or higher where the MediaBrowserServiceCompat doesn't get destroyed…

Nic Capdevila
- 1,495
- 14
- 27
1
vote
1 answer
Turning on Bluetooth starts MediaBrowserServiceCompat
When I turn on bluetooth on my OnePlus, then the MediaBrowserServiceCompat starts.
My first logcat entry comes from onCreate() method in my class extending MediaBrowserServiceCompat. Several other media player apps fire up as well.
There is not much…

Jure Sencar
- 554
- 4
- 13
1
vote
1 answer
Reattach Service to Activity?
When I first open the Activity it creates an MediaBrowserService. When i try to reopen it i wanted to reconnect to it. I tried mutliple ways:
override fun onResume(){
mMediaBrowser.connect()
buildTransportControls()
}
When i try doing this it…

DrDeep
- 45
- 1
- 9
1
vote
1 answer
Service.startForeground() in MediaBrowserServiceCompat
I am getting this error shown in the Android Dashboard crash logs:
Context.startForegroundService() did not then call Service.startForeground() (no location available)
I'm aware of the Background Limitations introduced in Oreo and have read through…

Kris B
- 3,436
- 9
- 64
- 106
1
vote
0 answers
stop service in MediaBrowserServiceCompat
I try to create some music application with help android-UniversalMusicPlayer
sample project. For that i create service in type MediaBrowserServiceCompat and register callback in MediaSessionCompat. after all in my activity, i can PAUSE or PLAY…

Saman
- 2,506
- 4
- 22
- 41
1
vote
0 answers
Concept behind MediaBrowserServiceCompat.onLoadChildren()
I am attempting to create a simple audio app and am referencing Google's MediaBrowserService example. My question is really grasping the concept behind MediaBrowserServiceCompat.onLoadChildren() and MediaSessionCompat.Callback methods onAddQueueItem…

Alyosha_Karamazov
- 133
- 11
1
vote
2 answers
Communication problems between fragment and a server
I have a fragmment that I would like to communicate with a server, but the problems is that i always get null pointer
I have this in my fragment onCreateView:
public class BrowseFragment extends Fragment implements View.OnClickListener{
private…

Gerardo Mendez Dot
- 209
- 2
- 10
1
vote
0 answers
MediaBrowserServiceCompat on API26
I just starting to develop an android app for background music player using MediaBrowserServiceCompat, and got this exception on Android emulator API 26 (not crash on API 24). Did I miss something or maybe I encountered API 26's bug?
Thank you
FATAL…

aryono
- 121
- 1
- 1
- 8
1
vote
3 answers
Unable to connect MediaBrowserCompat
I followed the Android official documentation on connecting MediaBrowserCompat but it's refused to connect, as a matter of fact neither onConnected(), onConnectionSuspended() or onConnectionFailed() is called.
I have also tried this answer but it…

X09
- 3,827
- 10
- 47
- 92
0
votes
1 answer
how to show indicator for current playing queueitem in mediabrowserservice (android auto) android?
enter image description here
i want to show indicator icon like above image
I will try lots of but i havent idea. how to do it like this

MacyMind
- 1
- 1
0
votes
0 answers
MediaSession.Callback onPrepareFromMediaId not triggered from android auto
I'm working on an Android project that uses MediaSession and it seems no matter what I do , MediaSession.Callback's onPrepareFromMediaId function is not triggered from the Android Auto.
The onGetRoot and onLoadChildren from the media browser service…

George Dumitrascu
- 11
- 2
0
votes
0 answers
how to add playlist as queue in android auto (MediaBrowserService)?
I try like this :
private MediaMetadataCompat mPreparedMedia;
mPreparedMedia = new MediaMetadataCompat.Builder()
.putString(MediaMetadataCompat.METADATA_KEY_MEDIA_ID, station.ChannelLink)
…

MacyMind
- 1
- 1
0
votes
1 answer
Controlling the speed in ExoPlayer via MediaBrowserServiceCompat
How can I control the speed from an exo player via the UI to MediaBrowserServiceCompat?
Does Android provide a normal solution for it?

David Feldman
- 39
- 6