Reputation: 1
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:
ComponentName componentName = new ComponentName("com.android.bluetooth", "com.android.bluetooth.avrcpcontroller.BluetoothMediaBrowserService");
mMediaBrowser = new MediaBrowserCompat(getApplicationContext(), componentName, mConnectionCallbacks, null);
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:
ComponentName componentName = new ComponentName("com.android.bluetooth", "com.android.bluetooth.avrcpcontroller.BluetoothMediaBrowserService");
mMediaBrowser = new MediaBrowserCompat(getApplicationContext(), componentName, mConnectionCallbacks, null);
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