如何在android中获取蓝牙配置文件状态

时间:2016-01-04 08:31:47

标签: android android-service android-bluetooth android-broadcast

无论如何以编程方式获取蓝牙配置文件状态?

1 个答案:

答案 0 :(得分:0)

试试这个:

BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
    if (mBluetoothAdapter == null) {
        // Device does not support Bluetooth
        System.out.println("Device does not support Bluetooth");
    } else {
        System.out.println("Status " + mBluetoothAdapter.isEnabled());
    }

基于:http://developer.android.com/guide/topics/connectivity/bluetooth.html