Commit 38ae16eb9376dbb7e72b5a2c8a245c43affa19c9
1 parent
9ae09a5f
1 修改历史轨迹查询过滤精度
2 修改定位过滤精度
Showing
8 changed files
with
43 additions
and
30 deletions
app/build.gradle
| @@ -21,8 +21,24 @@ android { | @@ -21,8 +21,24 @@ android { | ||
| 21 | } | 21 | } |
| 22 | } | 22 | } |
| 23 | } | 23 | } |
| 24 | + | ||
| 25 | + signingConfigs { | ||
| 26 | + debugConfig { | ||
| 27 | + storeFile file("www.cnlive.com.key") | ||
| 28 | + storePassword "www.cnlive.comPassw0rd" | ||
| 29 | + keyAlias "strike-debug" | ||
| 30 | + keyPassword "www.cnlive.com" | ||
| 31 | + } | ||
| 32 | + releaseConfig { | ||
| 33 | + storeFile file("www.cnlive.com.key") | ||
| 34 | + storePassword "www.cnlive.comPassw0rd" | ||
| 35 | + keyAlias "strike" | ||
| 36 | + keyPassword "www.cnlive.com" | ||
| 37 | + } | ||
| 38 | + } | ||
| 24 | buildTypes { | 39 | buildTypes { |
| 25 | debug { | 40 | debug { |
| 41 | + signingConfig signingConfigs.debugConfig | ||
| 26 | applicationIdSuffix ".debug" | 42 | applicationIdSuffix ".debug" |
| 27 | resValue("string", "app_name", "网++ 内测") | 43 | resValue("string", "app_name", "网++ 内测") |
| 28 | buildConfigField("String", "APP_ID", stringValue("802_jhbqccxw08")) | 44 | buildConfigField("String", "APP_ID", stringValue("802_jhbqccxw08")) |
| @@ -42,6 +58,8 @@ android { | @@ -42,6 +58,8 @@ android { | ||
| 42 | // BAIDU_MAP_APP_KEY: "0bWeo04KKKHqTwozcqgyLZVd0oVhv3rZ" | 58 | // BAIDU_MAP_APP_KEY: "0bWeo04KKKHqTwozcqgyLZVd0oVhv3rZ" |
| 43 | 59 | ||
| 44 | release { | 60 | release { |
| 61 | +// debuggable = true | ||
| 62 | + signingConfig signingConfigs.releaseConfig | ||
| 45 | resValue("string", "app_name", "网++") | 63 | resValue("string", "app_name", "网++") |
| 46 | buildConfigField("String", "APP_ID", stringValue("769_jetj7bq525")) | 64 | buildConfigField("String", "APP_ID", stringValue("769_jetj7bq525")) |
| 47 | buildConfigField("String", "APP_KEY", stringValue("0d57b045ec0c3988a682d94c644e66b9b8e0d2b8ef937d")) | 65 | buildConfigField("String", "APP_KEY", stringValue("0d57b045ec0c3988a682d94c644e66b9b8e0d2b8ef937d")) |
app/src/main/java/com/example/modulepedometer/MainActivity.java
| @@ -21,8 +21,8 @@ public class MainActivity extends AppCompatActivity { | @@ -21,8 +21,8 @@ public class MainActivity extends AppCompatActivity { | ||
| 21 | super.onCreate(savedInstanceState); | 21 | super.onCreate(savedInstanceState); |
| 22 | setContentView(R.layout.activity_main); | 22 | setContentView(R.layout.activity_main); |
| 23 | 23 | ||
| 24 | -// String uid = "10535072"; | ||
| 25 | - String uid = "358916"; | 24 | + String uid = "10535072"; |
| 25 | +// String uid = "358916"; | ||
| 26 | // String uid = "358689"; | 26 | // String uid = "358689"; |
| 27 | 27 | ||
| 28 | findViewById(R.id.recordd).setOnClickListener(new View.OnClickListener() { | 28 | findViewById(R.id.recordd).setOnClickListener(new View.OnClickListener() { |
app/src/main/java/com/example/modulepedometer/MyApp.java
| @@ -12,7 +12,7 @@ public class MyApp extends Application { | @@ -12,7 +12,7 @@ public class MyApp extends Application { | ||
| 12 | @Override | 12 | @Override |
| 13 | public void onCreate() { | 13 | public void onCreate() { |
| 14 | super.onCreate(); | 14 | super.onCreate(); |
| 15 | - String userId = "358916"; | 15 | + String userId = "10535072"; |
| 16 | // AppConfig.init(getApplicationContext(), BuildConfig.APP_ID, BuildConfig.APP_KEY, BuildConfig.APP_SCERET, | 16 | // AppConfig.init(getApplicationContext(), BuildConfig.APP_ID, BuildConfig.APP_KEY, BuildConfig.APP_SCERET, |
| 17 | // 0, BuildConfig.DEBUG, BuildConfig.BAIDU_MAP_APP_KEY, "", | 17 | // 0, BuildConfig.DEBUG, BuildConfig.BAIDU_MAP_APP_KEY, "", |
| 18 | // userId, "", "", "", "", "", "", "", BuildConfig.BAIDU_MAP_APP_KEY, ""); | 18 | // userId, "", "", "", "", "", "", "", BuildConfig.BAIDU_MAP_APP_KEY, ""); |
app/www.cnlive.com.key
0 → 100644
No preview for this file type
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/model/Constant.java
| @@ -37,11 +37,12 @@ public class Constant { | @@ -37,11 +37,12 @@ public class Constant { | ||
| 37 | /*****************************************运营工具其他值,非标志位****************************************************/ | 37 | /*****************************************运营工具其他值,非标志位****************************************************/ |
| 38 | public static final double PASS_RATE = 0.7;//通过率70% | 38 | public static final double PASS_RATE = 0.7;//通过率70% |
| 39 | public static final int CHECK_ACCURACY = 50;//判断用户是否完成的精度范围 | 39 | public static final int CHECK_ACCURACY = 50;//判断用户是否完成的精度范围 |
| 40 | - public static final int LOCA_ACCURACY = 100;//定位过滤精度 | 40 | + public static final int LOCA_ACCURACY = 75;//定位过滤精度 |
| 41 | + public static final int QUERY_HISTORY_TRACE_ACCURACY = 30;//历史轨迹查询过滤精度 | ||
| 41 | public static final int LOCA_END_POINT_ACCURACY = 20;//终点位置比较精度 | 42 | public static final int LOCA_END_POINT_ACCURACY = 20;//终点位置比较精度 |
| 42 | -// public static final int LOCA_END_POINT_ACCURACY = 2000000000;//终点位置比较精度 | 43 | + // public static final int LOCA_END_POINT_ACCURACY = 2000000000;//终点位置比较精度 |
| 43 | public static final int LOCA_START_POINT_ACCURACY = 20;//起点位置比较精度 | 44 | public static final int LOCA_START_POINT_ACCURACY = 20;//起点位置比较精度 |
| 44 | -// public static final int LOCA_START_POINT_ACCURACY = 2000000000;//起点位置比较精度 | 45 | + // public static final int LOCA_START_POINT_ACCURACY = 2000000000;//起点位置比较精度 |
| 45 | public static final int FENCE_OFFSET = 50;//围栏偏离距离 | 46 | public static final int FENCE_OFFSET = 50;//围栏偏离距离 |
| 46 | public static final int FENCE_DENOISE = 20;//围栏去噪精度20 | 47 | public static final int FENCE_DENOISE = 20;//围栏去噪精度20 |
| 47 | public static final int TAKE_POINT_MAX_SIZE = 100;//最大打点数量 | 48 | public static final int TAKE_POINT_MAX_SIZE = 100;//最大打点数量 |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/RegistrationInfoFragment.java
| @@ -75,6 +75,8 @@ public class RegistrationInfoFragment extends MvpBindingFragment<RegistrationInf | @@ -75,6 +75,8 @@ public class RegistrationInfoFragment extends MvpBindingFragment<RegistrationInf | ||
| 75 | } | 75 | } |
| 76 | AlertUtil.showDeftToast(getActivity(), "无法连接网络"); | 76 | AlertUtil.showDeftToast(getActivity(), "无法连接网络"); |
| 77 | } | 77 | } |
| 78 | + } else { | ||
| 79 | + AlertUtil.showDeftToast(getActivity(), "围栏数据异常,请联系运营人员"); | ||
| 78 | } | 80 | } |
| 79 | } | 81 | } |
| 80 | 82 |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/RunningMapFragment.java
| @@ -92,6 +92,20 @@ public class RunningMapFragment extends QMUIFragment<RunningMapFragmentView, Run | @@ -92,6 +92,20 @@ public class RunningMapFragment extends QMUIFragment<RunningMapFragmentView, Run | ||
| 92 | if (runningMapBean != null) { | 92 | if (runningMapBean != null) { |
| 93 | getMvpView().updateChronometer(runningMapBean); | 93 | getMvpView().updateChronometer(runningMapBean); |
| 94 | } | 94 | } |
| 95 | + } | ||
| 96 | + | ||
| 97 | + | ||
| 98 | + @Override | ||
| 99 | + public void onResume() { | ||
| 100 | + super.onResume(); | ||
| 101 | + if (getMvpView() != null) { | ||
| 102 | + getMvpView().onResume(); | ||
| 103 | + } | ||
| 104 | + if (getMvpView() != null) { | ||
| 105 | + //为系统的方向传感器注册监听器 | ||
| 106 | + mSensorManager.registerListener(getMvpView(), mSensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION), | ||
| 107 | + SensorManager.SENSOR_DELAY_UI); | ||
| 108 | + } | ||
| 95 | 109 | ||
| 96 | UserStepEntity userStepEntity = StepUtil.getUserStepData(getActivity(), CommonInfo.getUserId(getActivity())); | 110 | UserStepEntity userStepEntity = StepUtil.getUserStepData(getActivity(), CommonInfo.getUserId(getActivity())); |
| 97 | if (getMvpView() != null && userStepEntity != null) { | 111 | if (getMvpView() != null && userStepEntity != null) { |
| @@ -107,28 +121,6 @@ public class RunningMapFragment extends QMUIFragment<RunningMapFragmentView, Run | @@ -107,28 +121,6 @@ public class RunningMapFragment extends QMUIFragment<RunningMapFragmentView, Run | ||
| 107 | getPresenter().queryHistoryTrace(getActivity(), userStepEntity, false); | 121 | getPresenter().queryHistoryTrace(getActivity(), userStepEntity, false); |
| 108 | } | 122 | } |
| 109 | } | 123 | } |
| 110 | - | ||
| 111 | - | ||
| 112 | -// List<com.baidu.trace.model.LatLng> fenceLatLngs = new ArrayList<>(); | ||
| 113 | -// for (LatLng latLng : trackPoints) { | ||
| 114 | -// com.baidu.trace.model.LatLng tempLatLng = new com.baidu.trace.model.LatLng(latLng.latitude, latLng.longitude); | ||
| 115 | -// fenceLatLngs.add(tempLatLng); | ||
| 116 | -// } | ||
| 117 | -// getPresenter().createFence(getActivity(), fenceLatLngs); | ||
| 118 | - } | ||
| 119 | - | ||
| 120 | - | ||
| 121 | - @Override | ||
| 122 | - public void onResume() { | ||
| 123 | - super.onResume(); | ||
| 124 | - if (getMvpView() != null) { | ||
| 125 | - getMvpView().onResume(); | ||
| 126 | - } | ||
| 127 | - if (getMvpView() != null) { | ||
| 128 | - //为系统的方向传感器注册监听器 | ||
| 129 | - mSensorManager.registerListener(getMvpView(), mSensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION), | ||
| 130 | - SensorManager.SENSOR_DELAY_UI); | ||
| 131 | - } | ||
| 132 | } | 124 | } |
| 133 | 125 | ||
| 134 | @Override | 126 | @Override |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/utils/MyMapUtil.java
| @@ -201,7 +201,7 @@ public class MyMapUtil { | @@ -201,7 +201,7 @@ public class MyMapUtil { | ||
| 201 | } | 201 | } |
| 202 | } else { | 202 | } else { |
| 203 | //如果街道号或者街道为空 | 203 | //如果街道号或者街道为空 |
| 204 | - if ((null== reverseGeoCodeResult.getAddressDetail()||TextUtils.isEmpty(reverseGeoCodeResult.getAddressDetail().street)) && (null == reverseGeoCodeResult.getAddressDetail() || TextUtils.isEmpty(reverseGeoCodeResult.getAddressDetail().streetNumber))) { | 204 | + if ((null == reverseGeoCodeResult.getAddressDetail() || TextUtils.isEmpty(reverseGeoCodeResult.getAddressDetail().street)) && (null == reverseGeoCodeResult.getAddressDetail() || TextUtils.isEmpty(reverseGeoCodeResult.getAddressDetail().streetNumber))) { |
| 205 | if (!TextUtils.isEmpty(reverseGeoCodeResult.getAddress()) && !TextUtils.isEmpty(reverseGeoCodeResult.getSematicDescription())) { | 205 | if (!TextUtils.isEmpty(reverseGeoCodeResult.getAddress()) && !TextUtils.isEmpty(reverseGeoCodeResult.getSematicDescription())) { |
| 206 | geoCodeResult.success(reverseGeoCodeResult.getAddress() + "," + reverseGeoCodeResult.getSematicDescription()); | 206 | geoCodeResult.success(reverseGeoCodeResult.getAddress() + "," + reverseGeoCodeResult.getSematicDescription()); |
| 207 | } else if (!TextUtils.isEmpty(reverseGeoCodeResult.getAddress())) { | 207 | } else if (!TextUtils.isEmpty(reverseGeoCodeResult.getAddress())) { |
| @@ -501,7 +501,7 @@ public class MyMapUtil { | @@ -501,7 +501,7 @@ public class MyMapUtil { | ||
| 501 | // if (isNeedZoomInRaduis){ | 501 | // if (isNeedZoomInRaduis){ |
| 502 | // processOption.setRadiusThreshold(Constant.Need_ZOOM_IN_RADUIS); | 502 | // processOption.setRadiusThreshold(Constant.Need_ZOOM_IN_RADUIS); |
| 503 | // }else { | 503 | // }else { |
| 504 | - processOption.setRadiusThreshold(Constant.LOCA_ACCURACY); | 504 | + processOption.setRadiusThreshold(Constant.QUERY_HISTORY_TRACE_ACCURACY); |
| 505 | // } | 505 | // } |
| 506 | 506 | ||
| 507 | // 设置纠偏选项 | 507 | // 设置纠偏选项 |