Bluebooth被使用了很长时间,它不能使用。当我禁用蓝牙时,一段时间后,它会自动打开。打印信息时出错:
05-05 06:28:25.814: E/BTIF_CORE(5554): btif_disable_bluetooth : not yet enabled
05-05 06:28:33.819: E/BluetoothAdapterState(5554): Error disabling Bluetooth
05-05 06:28:33.855: E/PRX(628): hard code service registered.
05-05 06:28:33.874: E/BluetoothServiceJni(5554): SOCK FLAG = 1 ***********************
05-05 06:28:33.874: E/(5554): btmtk_jsr82_session_service_registration@264:[JSR82][JBT] JSR82 does not init
05-05 06:28:33.874: E/BluetoothServiceJni(5554): Socket listen failed: 1
05-05 06:28:33.874: E/BluetoothAdapterService(1112665360)(5554): Failed to create socket channel
05-05 06:28:33.874: E/[MAP]BluetoothMapService(5554): [initSocket] Error create RfcommServerSocket java.io.IOException: Error: -1
05-05 06:28:33.922: E/BluetoothServiceJni(5554): SOCK FLAG = 1 ***********************
05-05 06:28:33.922: E/(5554): btmtk_jsr82_session_service_registration@264:[JSR82][JBT] JSR82 does not init
05-05 06:28:33.922: E/BluetoothServiceJni(5554): Socket listen failed: 1
05-05 06:28:33.923: E/BluetoothAdapterService(1112665360)(5554): Failed to create socket channel
05-05 06:28:33.923: E/BluetoothPbapService(5554): Error create RfcommServerSocket java.io.IOException: Error: -1
05-05 06:28:33.982: E/BluetoothReceiver(1042): [MMI][BluetoothReceiver.startService][start service [com.mediatek.bluetooth.AdvancedService]
05-05 06:28:33.994: E/BluetoothServiceJni(5554): SOCK FLAG = 0 ***********************
05-05 06:28:33.994: E/(5554): btmtk_jsr82_session_service_registration@264:[JSR82][JBT] JSR82 does not init发布于 2015-05-06 16:31:45
BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);
BluetoothAdapter to = bluetoothManager.getAdapter();
isServiceRestart = true;
if(to.isEnabled()) {
to.disable();
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
to.enable();
} else if(!to.isEnabled()) {
to.enable();
}发布于 2015-07-24 22:49:43
https://stackoverflow.com/questions/30069657
复制相似问题