androidbluetoothandroid-ndka2dp

Android bluedroid stack - Enable a2dp sink - NDK application


I am trying to enable a2dp sink profile in Nexus - Android M. It looks that support for a2dp sink can be enabled by setting the appropriate flag present at /external/bluetooth/bluedroid/include/bt_target.h file.

/* Enable bluetooth av sink. */
#define BTA_AV_SINK_INCLUDED TRUE

Instead of compiling and flashing the complete system image, can I just pull out the updated bluetooth library and use that library in NDK, and develop standalone solution for a2dp sink? Does it work as expected? I am looking for ways to make it work standalone solution....


Solution

  • The #define:

    #define BTA_AV_SINK_INCLUDED TRUE
    

    present in /external/bluetooth/bluedroid/include/bt_target.h file has to be enabled and other feature flags at system level are required to be set for the proper compilation. This required the whole build (i.e the complete system image) and not the standalone way of installing the required executables and running the system instantly.

    Thank you.