1

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 = ComponentName("com.android.bluetooth",
           "com.android.bluetooth.avrcpcontroller.BluetoothMediaBrowserService")

        mMediaBrowser = MediaBrowserCompat(context,comp,mConnectionCallbacks,null)
        mMediaBrowser?.connect()

but connection always failed

 Unable to start service Intent { act=android.media.browse.MediaBrowserService cmp=com.android.bluetooth/.a2dpsink.mbs.A2dpMediaBrowserService } U=0: not found

I also tried avrcpcontroller.BluetoothMediaBrowserService

Unable to start service Intent { act=android.media.browse.MediaBrowserService cmp=com.android.bluetooth/.avrcpcontroller.BluetoothMediaBrowserService } U=0: not found

It seems there is no way to connect the mediabrowser from WearOS watch.

Haozes
  • 352
  • 2
  • 12
  • It is not currently supported. If you want to implement this at the moment, you will need to use the DataLayer and connect to your own app on mobile. It won't work generically for other apps. – Yuri Schimke Dec 30 '22 at 04:43
  • Thank you for answer. Yeah, I hope it can work generically with any audio apps. – Haozes Dec 31 '22 at 02:24

0 Answers0