Android应用程序在工作数小时后停止接收BLE数据

时间:2018-04-15 12:55:31

标签: android bluetooth bluetooth-lowenergy

我正在开发一个从Ble设备获取数据的应用程序,在图表中绘制数据(使用MPAndroidChart)并将数据保存到文件中(使用bufferedWriter)。

一切正常,但是当我长时间运行应用程序时,应用程序突然没有收到任何更多的数据,当我在其响应的活动中按下按钮时,它没有被卡住,并且在Logcat中,当我按下屏幕时,它会响应。

我在Logcat中看到数据接收日志即将停止并且线路" D / BluetoothGatt:onBluetoothStateChange:up = true onBluetoothStateChange:蓝牙已打开"出现4次。 在Android Profiler中,我看到在数据停止之前分配的数据增加得更慢(参见附图)。 Android Profiler when the data stopped

使用Samsung Tab A(2016)Android 7运行应用程序。

我不确定接下来应该检查什么以及如何理解为什么会出现此问题? 有什么建议吗?

0 个答案:

没有答案