A2DP Sink, AVRCP Controller and HFP Client in Android L

Source: Internet
Author: User

The APIs of A2DP sink, AVRCP controller and HFP client is not published on Android L, but the code which implements the Profiles is indeed in Android L. You can set the configuration for the car to build the code.

Where is the code?
  • A2DP Sink
    • /frameworks/base/core/java/android/bluetooth/bluetootha2dpsink.java
    • /packages/apps/bluetooth/src/com/android/bluetooth/a2dp/a2dpsinkservice.java
    • /packages/apps/bluetooth/src/com/android/bluetooth/a2dp/a2dpsinkstatemachine.java
    • /packages/apps/bluetooth/jni/com_android_bluetooth_a2dp_sink.cpp
    • /hardware/libhardware/include/hardware/bt_av.h
  • AVRCP Controller
    • /frameworks/base/core/java/android/bluetooth/bluetoothavrcpcontroller.java
    • /packages/apps/bluetooth/src/com/android/bluetooth/avrcp/avrcpcontrollerservice.java
    • /packages /apps/bluetooth/jni/com_android_bluetooth_avrcp_controller.cpp
  • HFP client
    • /frameworks/base/core/java/android/bluetooth/bluetoothheadsetclient.java
    • / Frameworks/base/core/java/android/bluetooth/bluetoothheadsetclientcall.java
    • /packages/apps/ Bluetooth/src/com/android/bluetooth/hfpclient/headsetclienthalconstants.java
    • /packages/apps/ Bluetooth/src/com/android/bluetooth/hfpclient/headsetclientservice.java
    • /packages/apps/bluetooth/ Src/com/android/bluetooth/hfpclient/headsetclientstatemachine.java
    • /packages/apps/bluetooth/jni/ Com_android_bluetooth_hfpclient.cpp
    • /hardware/libhardware/include/hardware/bt_hf_client.h
I does not list the files in bluedroid. You can find the files which is added or modified for A2DP sink, AVRCP controllers and HFP client in the layers of BTIF, B TA and BTE (Stack directory). An A2DP decoder locates in /external/bluetooth/bluedroid/embdrv/sbc/decoder/. How to build the code? Google develops A2DP sink, AVRCP Controller and HFP Client for Android Auto. Car_hammerhead.mk is added in /device/lge/hammerhead/. You must add the product item ' Add_lunch_combo car_hammerhead-userdebug ' in /device/lge/hammerhead/vendorsetup.sh . Then run ' Lunch ', and select ' Car_hammerhead-userdebug '. Now you can build the image of Car_hammerhead and flash the image to Nexus 5.You can used Hcitool and sdptool to browse AL L Available Services on Nexus 5 with car_hammerhead image.  you should see A2DP sink, AVRCP controllers and HFP client in the list of available services. If you want to hear the "sound" from the Speaker of Nexus 5 with Car_hammerhead image, the ApP which uses A2DP sink APIs to trigger the audio routing from the BT stack to speaker. If No APP registers a listener to bluedroid, the audio data would be discarded before decoder.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

A2DP Sink, AVRCP Controller and HFP Client in Android L

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.