相关疑难解决方法(0)

如何在android中以编程方式启用/禁用蓝牙

大家好,

我想通过程序启用/禁用蓝牙..我有以下代码.

BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();    
if (!mBluetoothAdapter.isEnabled()) {
        Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
        startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
Run Code Online (Sandbox Code Playgroud)

但是这种代码在SDK 1.5中不起作用.我怎么能在SDK 1.5中做同样的事情.

android bluetooth

101
推荐指数
5
解决办法
16万
查看次数

列出连接的蓝牙设备?

如何在Android上列出所有连接的蓝牙设备?

谢谢!

android bluetooth

17
推荐指数
1
解决办法
2万
查看次数

如何从特定的蓝牙配置文件中获取连接的设备列表

无论如何可以从支持配置文件(HDD、Spp 和音频)中获取连接的设备列表。要求就像我的设备将支持 HDD、SPP 和音频,所以我必须过滤支持所有这些配置文件的设备。反正有过滤设备吗?

android android-bluetooth bluetooth-profile

1
推荐指数
1
解决办法
3964
查看次数