修复亮屏时计步信息仍然不及时更新的问题。
authorsnickersun <snickersun@qq.com>
Tue, 25 Feb 2020 03:50:41 +0000 (11:50 +0800)
committersnickersun <snickersun@qq.com>
Tue, 25 Feb 2020 03:50:41 +0000 (11:50 +0800)
app/src/main/java/com/enqualcomm/support/CoreService.java
app/src/main/java/com/enqualcomm/support/LocationClient.java

index 2c35f7b..7205f83 100644 (file)
@@ -304,9 +304,10 @@ public class CoreService extends Service {
 \r
 \r
                 //为了保证唤醒时各个状态及时更新到服务器,发送一个同步心跳包,这样用户体验更好\r
+                CoreService.getInstance().locationClient.updateStepCount();\r
                 Observable.timer(500L, TimeUnit.MILLISECONDS).subscribe(new Action1<Long>() {\r
                     public void call(Long param1Long) {\r
-                        connection.send(protocolAPIHelper.genStringMessage("heart",protocolAPIHelper.AP03(runtime)));\r
+                         connection.send(protocolAPIHelper.genStringMessage("heart",protocolAPIHelper.AP03(runtime)));\r
                     }\r
                 });\r
 \r
index 612d9a8..d6efce2 100644 (file)
@@ -169,7 +169,7 @@ public class LocationClient {
     }\r
   }\r
   //计算运动并发送数据\r
-  private void updateStepCount() {\r
+  public void updateStepCount() {\r
     this.gSensorListener.updateStepCount();\r
 \r
 //    this.H12StepCount = DeviceInfoUtil.getStepCount((runtime.getContextProxy()).context);\r