qq328854225 2017-04-19 02:00 采纳率: 0%
浏览 2428

BLE黑屏后导致APP崩溃

场景1:手机刚刚重启完,运行APP与BLE设备通信,正常无问题(任何情况)
场景2:中断当前BLE操作,退出APP,然后重新与BLE设备通信,一旦把APP切换到后台并黑屏,APP会在几秒内崩溃,logcat没任何错误输出

求大神解答,跪求,以下是捕抓的bug输出(bugly也抓不到),但是重启手机后第一次正常操作,往后就一直会出现描述的问题
04-18 17:58:03.578 2971-3014/? E/BluetoothServiceJni: An exception was thrown by callback 'btgattc_notify_cb'.
04-18 17:58:03.578 2971-3014/? E/BluetoothServiceJni: android.os.DeadObjectException
at android.os.BinderProxy.transact(Native Method)
at android.bluetooth.IBluetoothGattCallback$Stub$Proxy.onNotify(IBluetoothGattCallback.java:835)
at com.android.bluetooth.gatt.GattService.onNotify(GattService.java:724)
at dalvik.system.NativeStart.run(Native Method)
04-18 17:58:03.578 2971-3014/? D/BtGatt.btif: btif_gattc_upstreams_evt: Event 10
04-18 17:58:03.578 2971-3014/? E/bt-btif: HAL bt_gatt_callbacks->client->notify_cb
04-18 17:58:03.578 2971-3014/? D/BtGatt.GattService: onNotify() - address=F0:C7:7F:73:68:20, charUuid=0000ffb2-0000-1000-8000-00805f9b34fb, length=19
04-18 17:58:03.578 2971-3014/? E/BluetoothServiceJni: An exception was thrown by callback 'btgattc_notify_cb'.
04-18 17:58:03.578 2971-3014/? E/BluetoothServiceJni: android.os.DeadObjectException
at android.os.BinderProxy.transact(Native Method)
at android.bluetooth.IBluetoothGattCallback$Stub$Proxy.onNotify(IBluetoothGattCallback.java:835)
at com.android.bluetooth.gatt.GattService.onNotify(GattService.java:724)
at dalvik.system.NativeStart.run(Native Method)
04-18 17:58:03.578 2971-2982/? D/BtGatt.GattService: Binder is dead - unregistering client (6)!
04-18 17:58:03.578 2971-2982/? D/BtGatt.GattService: stopScan() - queue=0
04-18 17:58:03.578 2971-2982/? D/BtGatt.GattService: stopScan() - queue empty; stopping scan
04-18 17:58:03.578 2971-2982/? D/BtGatt.btif: btif_gattc_scan
04-18 17:58:03.578 2971-2982/? D/BtGatt.GattService: unregisterClient() - clientIf=6
04-18 17:58:03.578 2971-2982/? D/BtGatt.btif: btif_gattc_unregister_app
04-18 17:58:03.578 2971-3014/? D/BtGatt.btif: btgattc_handle_event: Event 1003
04-18 17:58:03.578 2971-3014/? D/BtGatt.btif: btgattc_handle_event: Event 1001
04-18 17:58:03.578 2971-3088/? W/bt-l2cap: L2CA_RemoveFixedChnl() CID: 0x0004 BDA: f0c77f736820 not connected
04-18 17:58:03.578 1156-1539/? D/KeyguardViewMediator: setHidden false
04-18 17:58:03.578 1156-1539/? D/KeyguardUpdateMonitor: sendKeyguardVisibilityChanged(true)
04-18 17:58:03.578 1156-1156/? D/KeyguardUpdateMonitor: handleKeyguardVisibilityChanged(1)
04-18 17:58:03.578 2971-3014/? D/BtGatt.btif: btif_gattc_upstreams_evt: Event 5
04-18 17:58:03.578 2971-3014/? E/bt-btif: HAL bt_gatt_callbacks->client->close_cb
04-18 17:58:03.578 2971-3014/? D/BtGatt.GattService: onDisconnected() - clientIf=6, connId=6, address=F0:C7:7F:73:68:20
04-18 17:58:03.578 2971-3014/? E/BtGatt.ContextMap: Context not found for ID 6

  • 写回答

2条回答 默认 最新

  • 小菜陈 2017-04-25 09:52
    关注

    android ble很多坑,你只要理解了android ble具体的通信流程就会找到问题,我也做android ble应用,一堆坑,我现在单个连接通信没什么问题,一旦
    重复连接,多个设备,会发现有时无法完全断开,反正闹心

    评论

报告相同问题?

悬赏问题

  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题