https://github.com/t5750/pedometer
:feet: An Android Pedometer
https://github.com/t5750/pedometer
android android-library genymotion hellocharts leakcanary logger
Last synced: 4 months ago
JSON representation
:feet: An Android Pedometer
- Host: GitHub
- URL: https://github.com/t5750/pedometer
- Owner: T5750
- License: apache-2.0
- Created: 2018-08-06T04:51:05.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-07T02:00:02.000Z (over 6 years ago)
- Last Synced: 2025-02-21T17:48:16.932Z (8 months ago)
- Topics: android, android-library, genymotion, hellocharts, leakcanary, logger
- Language: Java
- Homepage:
- Size: 599 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://travis-ci.org/T5750/pedometer)
[](https://github.com/T5750/pedometer/releases/latest)
[](https://github.com/T5750/pedometer/blob/master/LICENSE.txt)
# Pedometer
[](https://github.com/T5750/pedometer/releases/latest)
## Runtime Environment
- [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
- [Android Studio](http://www.androiddevtools.cn/#android-studio)
- [HelloCharts for Android](https://github.com/lecho/hellocharts-android)
- [LeakCanary](https://github.com/square/leakcanary)
- [Genymotion](https://www.genymotion.com/download/)
- [Android Debug Database](https://github.com/amitshekhariitbhu/Android-Debug-Database)
- [Logger](https://github.com/orhanobut/logger)## What's included
- 计步模块(类似微信运动,支付宝计步,今日步数)
- 步数仿支付宝余额数字累加效果
- 计算BMI指数,仿支付宝芝麻信用分仪表盘
- HelloChart绘制今日步数柱状图
- ~~设置透明状态栏,Android Version >= 4.4~~
- 备份 / 还原数据库### HelloCharts for Android
- ```implementation 'com.github.lecho:hellocharts-library:1.5.8@aar'```
- ```lecho.lib.hellocharts.view.ColumnChartView```### LeakCanary
```
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.1'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.1'
``````
public class ExampleApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
if (LeakCanary.isInAnalyzerProcess(this)) {
// This process is dedicated to LeakCanary for heap analysis.
// You should not init your app in this process.
return;
}
LeakCanary.install(this);
// Normal app init code...
}
}
```
启动Activity的shell命令
```
adb shell am start -n [包名]/[Activity名]
adb shell am start -n com.evangel.pedometer/com.evangel.pedometer.activity.MainActivity
```### Android Debug Database
1. ```debugImplementation 'com.amitshekhar.android:debug-db:1.0.4'```
1. Genymotion -> Configuration -> Network mode -> Bridge
1. D/DebugDB: Open http://xxx.xxx.xxx.xxx:8080 in your browser### Logger
1. ```implementation 'com.orhanobut:logger:2.2.0'```
1. ```Logger.addLogAdapter(new AndroidLogAdapter());```
1. ```Logger.d("hello");```> Changed Android Studio from 3.1.4 to 3.3 Canary 5.
## Tips
- 一些不能后台的手机,需告诉用户每天早上打开一次app才可以正常计步
- 数据库中,运动数据保存366天,`TodayStepService.DB_LIMIT`
- 保存数据库的频率,`TodayStepService.DB_SAVE_COUNTER`
- 卡路里,目前默认按体重60kg来进行计算
- 设置中的提醒,仅供参考## References
- [TodayStepCounter](https://github.com/jiahongfei/TodayStepCounter) Commits on Feb 24, 2018
- [DylanStepCount](https://github.com/linglongxin24/DylanStepCount) Commits on Nov 23, 2017
- [FastHub](https://github.com/k0shk0sh/FastHub)## License
Pedometer is Open Source software released under the [Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0.html).