\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
}\r
}\r
//计算运动并发送数据\r
- private void updateStepCount() {\r
+ public void updateStepCount() {\r
this.gSensorListener.updateStepCount();\r
\r
// this.H12StepCount = DeviceInfoUtil.getStepCount((runtime.getContextProxy()).context);\r