Nono.huang
Nono.huang

Reputation: 1

Inquiry Regarding AVRCP Implementation

I am currently constructing an AOSP IVI system where the requirement is to use AOSP as a Bluetooth receiver capable of controlling audio playback on a mobile phone (play/pause).

I have successfully implemented A2DP Sink in the AOSP environment, allowing it to receive audio from a mobile phone and play it back.

The AOSP environment has been configured as follows:

<bool name="profile_supported_avrcp_controller">true</bool>

The implementation approach involves connecting to the BluetoothMediaBrowserService and controlling the audio source as follows:

  1. Service to connect to

ComponentName componentName = new ComponentName("com.android.bluetooth", "com.android.bluetooth.avrcpcontroller.BluetoothMediaBrowserService");

  1. Create a MediaBrowser

mMediaBrowser = new MediaBrowserCompat(getApplicationContext(), componentName, mConnectionCallbacks, null);

  1. Establish connection

mMediaBrowser.connect(); .... mController.getTransportControls().play();

However, there is no response, and AvrcpController.getConnectedDevices() even returns empty.

I would appreciate any assistance or guidance on implementing AVRCP in this context.

The AOSP environment has been configured as follows:

<bool name="profile_supported_avrcp_controller">true</bool>

The implementation approach involves connecting to the BluetoothMediaBrowserService and controlling the audio source as follows:

  1. Service to connect to

ComponentName componentName = new ComponentName("com.android.bluetooth", "com.android.bluetooth.avrcpcontroller.BluetoothMediaBrowserService");

  1. Create a MediaBrowser

mMediaBrowser = new MediaBrowserCompat(getApplicationContext(), componentName, mConnectionCallbacks, null);

  1. Establish connection

mMediaBrowser.connect(); .... mController.getTransportControls().play();

However, there is no response, and AvrcpController.getConnectedDevices() even returns empty.

I would appreciate any assistance or guidance on implementing AVRCP in this context.

Upvotes: 0

Views: 115

Answers (0)

Related Questions