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

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应用,一堆坑,我现在单个连接通信没什么问题,一旦
    重复连接,多个设备,会发现有时无法完全断开,反正闹心

    评论

报告相同问题?

悬赏问题

  • ¥15 C#调用python代码(python带有库)
  • ¥15 矩阵加法的规则是两个矩阵中对应位置的数的绝对值进行加和
  • ¥15 活动选择题。最多可以参加几个项目?
  • ¥15 飞机曲面部件如机翼,壁板等具体的孔位模型
  • ¥15 vs2019中数据导出问题
  • ¥20 云服务Linux系统TCP-MSS值修改?
  • ¥20 关于#单片机#的问题:项目:使用模拟iic与ov2640通讯环境:F407问题:读取的ID号总是0xff,自己调了调发现在读从机数据时,SDA线上并未有信号变化(语言-c语言)
  • ¥20 怎么在stm32门禁成品上增加查询记录功能
  • ¥15 Source insight编写代码后使用CCS5.2版本import之后,代码跳到注释行里面
  • ¥50 NT4.0系统 STOP:0X0000007B