Commit 3ee7a10bb9ebab268a36e11eda8314364e803efd

Authored by 杨帅
1 parent e25955c7

1 调整计步服务

config.gradle
... ... @@ -21,7 +21,7 @@ ext {
21 21 //编译方式
22 22 debug : false,
23 23 //版本号
24   - version: "0.7.11",
  24 + version: "0.7.12",
25 25 //Lib库前缀
26 26 packeg : "com.cnlive.module",
27 27 //Lib库名称
... ...
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/CollRunningMapFragmentView.java
... ... @@ -565,7 +565,7 @@ public class CollRunningMapFragmentView implements MvpView, SensorEventListener
565 565 //minTimeInterval - 最短定位时间间隔,单位毫秒,最小值0,开发者可以在设置希望的位置回调最短时间间隔
566 566 //minDistance - 最短定位距离间隔,单位米,最小值0,开发者可以设置希望的位置回调距离间隔
567 567 //locSensitivity - 定位变化敏感程度,LOC_SENSITIVITY_HIGHT,LOC_SENSITIVITY_MIDDLE,LOC_SENSITIVITY_LOW
568   - option.setOpenAutoNotifyMode(3000, 1, LocationClientOption.LOC_SENSITIVITY_HIGHT);
  568 +// option.setOpenAutoNotifyMode(3000, 1, LocationClientOption.LOC_SENSITIVITY_HIGHT);
569 569 //可选,定位SDK内部是一个service,并放到了独立进程。
570 570 //设置是否在stop的时候杀死这个进程,默认(建议)不杀死,即setIgnoreKillProcess(true)
571 571 option.setIgnoreKillProcess(true);
... ...
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/StartTraceFragmentView.java
... ... @@ -360,7 +360,8 @@ public class StartTraceFragmentView implements MvpView, SensorEventListener {
360 360 //可选,设置是否需要设备方向结果
361 361 option.setNeedDeviceDirect(false);
362 362 //设置打开自动回调位置模式,该开关打开后,期间只要定位SDK检测到位置变化就会主动回调给开发者
363   - option.setOpenAutoNotifyMode(3000, 1, LocationClientOption.LOC_SENSITIVITY_HIGHT);
  363 +// option.setOpenAutoNotifyMode(3000, 1, LocationClientOption.LOC_SENSITIVITY_HIGHT);
  364 + option.setOpenAutoNotifyMode();
364 365 mLocClient.setLocOption(option);
365 366 mLocClient.start();
366 367 //设置地图加载完毕监听
... ...
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/service/CollStepService.java
... ... @@ -721,10 +721,10 @@ public class CollStepService extends Service implements SensorEventListener {
721 721 * 监听晚上0点变化初始化数据
722 722 */
723 723 private void isNewDay() {
724   - String time = "00:00";
725   - if (time.equals(new SimpleDateFormat("HH:mm").format(new Date())) || !CURRENT_DATE.equals(getTodayDate())) {
726   - initTodayData(userId);
727   - }
  724 +// String time = "00:00";
  725 +// if (time.equals(new SimpleDateFormat("HH:mm").format(new Date())) || !CURRENT_DATE.equals(getTodayDate())) {
  726 +// initTodayData(userId);
  727 +// }
728 728 }
729 729  
730 730 // /**
... ...
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunRaceDetailFragmentView.java
... ... @@ -812,7 +812,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener {
812 812 //可选,设置是否需要设备方向结果
813 813 option.setNeedDeviceDirect(false);
814 814 //设置打开自动回调位置模式,该开关打开后,期间只要定位SDK检测到位置变化就会主动回调给开发者
815   - option.setOpenAutoNotifyMode(3000, 1, LocationClientOption.LOC_SENSITIVITY_HIGHT);
  815 +// option.setOpenAutoNotifyMode(3000, 1, LocationClientOption.LOC_SENSITIVITY_HIGHT);
816 816 mLocClient.setLocOption(option);
817 817 mLocClient.start();
818 818 //设置地图加载完毕监听
... ...
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunningMapFragmentView.java
... ... @@ -214,7 +214,7 @@ public class RunningMapFragmentView implements MvpView, SensorEventListener {
214 214 //minTimeInterval - 最短定位时间间隔,单位毫秒,最小值0,开发者可以在设置希望的位置回调最短时间间隔
215 215 //minDistance - 最短定位距离间隔,单位米,最小值0,开发者可以设置希望的位置回调距离间隔
216 216 //locSensitivity - 定位变化敏感程度,LOC_SENSITIVITY_HIGHT,LOC_SENSITIVITY_MIDDLE,LOC_SENSITIVITY_LOW
217   - option.setOpenAutoNotifyMode(3000, 1, LocationClientOption.LOC_SENSITIVITY_HIGHT);
  217 +// option.setOpenAutoNotifyMode(3000, 1, LocationClientOption.LOC_SENSITIVITY_HIGHT);
218 218 //可选,定位SDK内部是一个service,并放到了独立进程。
219 219 //设置是否在stop的时候杀死这个进程,默认(建议)不杀死,即setIgnoreKillProcess(true)
220 220 option.setIgnoreKillProcess(true);
... ...
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/service/StepService.java
... ... @@ -877,12 +877,12 @@ public class StepService extends Service implements SensorEventListener {
877 877 } else if (Intent.ACTION_DATE_CHANGED.equals(action)) {//日期变化步数重置为0
878 878 // Logger.d("重置步数" + StepDcretor.CURRENT_STEP);
879 879 save();
880   - isNewDay();
  880 +// isNewDay();
881 881 } else if (Intent.ACTION_TIME_CHANGED.equals(action)) {
882 882 //时间变化步数重置为0
883 883 // isCall();
884 884 save();
885   - isNewDay();
  885 +// isNewDay();
886 886 } else if (Intent.ACTION_TIME_TICK.equals(action)) {//日期变化步数重置为0
887 887 // isCall();
888 888 // Logger.d("重置步数" + StepDcretor.CURRENT_STEP);
... ... @@ -911,10 +911,10 @@ public class StepService extends Service implements SensorEventListener {
911 911 * 监听晚上0点变化初始化数据
912 912 */
913 913 private void isNewDay() {
914   - String time = "00:00";
915   - if (time.equals(new SimpleDateFormat("HH:mm").format(new Date())) || !CURRENT_DATE.equals(getTodayDate())) {
916   - initTodayData(userId);
917   - }
  914 +// String time = "00:00";
  915 +// if (time.equals(new SimpleDateFormat("HH:mm").format(new Date())) || !CURRENT_DATE.equals(getTodayDate())) {
  916 +// initTodayData(userId);
  917 +// }
918 918 }
919 919  
920 920 // /**
... ...