安卓:确定活动的蓝牙连接 [英] Android: Identifying active Bluetooth connections

查看:312
本文介绍了安卓:确定活动的蓝牙连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法,当我开始我的应用程序,它可以计算出,如果任何蓝牙设备都在积极接通了电话?我想我的应用程序能够通过提供BT设备名活跃BT连接上汇报。

Is there a way that when I start my app, it can figure out if any Bluetooth devices are actively connected to the phone? I want my app to be able to report on an active BT connection by supplying the BT device name.

我找不到,这似乎是能够处理检查活动插座和有源器件报告BT API中的任何东西。只是似乎能够跟踪这些设备,如果我的应用程序将停止所有活动的连接,然后尝试设立一个在运行时。

I cannot find anything in the BT API that seems to be able to handle checking sockets for activity and reporting on active devices. Only seem to be able to track such devices if my app stops all active connections and then tries to establish one while it is running.

在这里任何帮助将是AP preciated。

Any help here would be appreciated.

推荐答案

不幸的是没有 -
最近API级别11引入的API找到,如果A2DP或耳机配置文件的连接,并获取连接的设备此配置文件。

Unfortunately No - The recent API Level 11 introduces APIs to find if A2DP or Headset profile is connected, and to retrieve the connected devices to this profile.

这篇关于安卓:确定活动的蓝牙连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆