查询蓝牙状态: bluetoothManager.getAdapter().isEnabled 需要BLUETOOTH权限。改变蓝牙状态: bluetoothManager.getAdapter().disable();
bluetoothManager.getAdapter().enable();然而这两个方法不知道能不能调用成功。因为GOOGLE不想你不经用户同意私自设置他的手机,这样的设计也是为安全考虑吧。 需要BLUETOOTH_ADMIN权限。贴上API的原文:Bluetooth should never be disabled without direct user consent. The disable() method is provided only for applications that include a user interface for changing system settings, such as a "power manager" app.