Ckai~老西儿 2018-12-26 15:15 采纳率: 0%
浏览 2994

Android BluetoothA2dpSink相关问题

1 本人需要将Android设备添加蓝牙音响功能,所以需要实现BluetoothA2dpSink,在开始前,已修改内容如下:
1)/package/app/bluetooth/res/value/config.xml
true
2) /system/bt/include/bt_target.h
#define BTA_AV_SINK_INCLUDE TRUE
2 代码如下

 private void initBluetoothSink() {
        mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
        mBluetoothAdapter.setName("ImiBluetooth");
        if (!mBluetoothAdapter.isEnabled()) {
            //弹出对话框提示用户是后打开
            Intent enabler = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
            startActivityForResult(enabler, 1);
        }
        //获取A2DP代理对象
        mBluetoothAdapter.getProfileProxy(this, mListener, BluetoothProfile.A2DP);
    }

3 问题:
走到BluetoothSinkService.doBind()时一直
Log.e(TAG, "Could not bind to Bluetooth A2DP Service with " + intent);
也就是mContext.bindServiceAsUser(intent, mConnection, 0,
android.os.Process.myUserHandle())返回false
有没有大神面对过相关需求,及相应解决方案或思路?


  • 写回答

1条回答 默认 最新

  • hufen2740 2019-11-07 11:42
    关注

    这种一般要蓝牙模块技术支持的

    评论

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?