我有一个连接蓝牙设备的应用程序,它基于这个例子:
每当我拨打BluetoothGatt.disconnect()时,它都会启用NFC。我没有在代码中使用NFC,清单中没有NFC。
看起来BluetoothGatt.disconnect强制启动NfcService,它没有任何意义,每次都会发生:
com.ble.ble I / BluetoothLeService:与GATT服务器断开连接。 D / BtGatt.btif:btif_gattc_upstreams_evt:事件14 D / IOP_DB_BT:db_query_create:id DisablePwlCtrReq :: key KEY_BDADDR,值30:ae:a4:0d:79:e6 D / IOP_DB_BT:db_query_add_key:键KEY_LMP_MFCT,值0 D / IOP_DB_BT:db_query_add_key:键KEY_LMP_VER,值0:0 D / IOP_DB_BT:db_query_add_key:键KEY_DIR_ALL,值* D / IOP_DB_BT:db_query_execute:结果1 D / BluetoothRemoteDevices:aclStateChangeCallback:状态:DisConnected to Device:30:AE:A4:0D:79:E6 D / KeyguardViewMediator:收到android.bluetooth.device.action.ACL_DISCONNECTED connectedBTforSmartLock = false I / NfcService:android.bluetooth.device.action.ACL_DISCONNECTED,重启 D / BleAutoConnectService:android.bluetooth.device.action.ACL_DISCONNECTED D / BleAutoConnectService:ACTION_ACL_DISCONNECTED,原因是22linktype是2 D / BleAutoConnectService:getAddress() - address ==>空值 D / BluetoothAdapterService(1113351520):获取被调用的绑定设备 D / BluetoothAdapterService(1113351520):获取被调用的绑定设备 D / BluetoothAdapterService(1113351520):获取被调用的绑定设备 I / NfcService:启用NFC
为什么会这样?为何选择NFC?如何防止NFC启动?
在三星I9300,Android 4.3上测试过。