android 步数传感器如何 只获取当天的数据?
阿神
阿神 2017-04-18 09:13:53
0
2
603

android 步数传感器如果 只获取当天的数据?

获取到的数据包括今天之前的所有步数的值,但只想获取当天的,该如何获取呢?

阿神
阿神

闭关修行中......

reply all(2)
Ty80

Save the values ​​of all previous steps with date as the key.

Then get the total number of steps for the day and subtract the previous day's to get the current day's.

Ty80

The method above is OK. It is recommended to use a database to store the number of steps per day. More specifically, it is to store the number of steps per day by time. In this way, the number of steps in any time period of any day can be obtained, providing more expansion.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template