Commit 14d23495ac763e132d33cfa0de5795070e434ce5

Authored by 韩亚云
2 parents c5cbdffa f4c87264

Merge branch 'master' of bj.gitlab.cnlive.com:cnlive-team/ModulePedometer

Showing 374 changed files with 860 additions and 367 deletions
.idea/gradle.xml
@@ -3,9 +3,6 @@ @@ -3,9 +3,6 @@
3 <component name="GradleSettings"> 3 <component name="GradleSettings">
4 <option name="linkedExternalProjectsSettings"> 4 <option name="linkedExternalProjectsSettings">
5 <GradleProjectSettings> 5 <GradleProjectSettings>
6 - <compositeConfiguration>  
7 - <compositeBuild compositeDefinitionSource="SCRIPT" />  
8 - </compositeConfiguration>  
9 <option name="distributionType" value="DEFAULT_WRAPPED" /> 6 <option name="distributionType" value="DEFAULT_WRAPPED" />
10 <option name="externalProjectPath" value="$PROJECT_DIR$" /> 7 <option name="externalProjectPath" value="$PROJECT_DIR$" />
11 <option name="modules"> 8 <option name="modules">
app/build.gradle
@@ -9,10 +9,10 @@ android { @@ -9,10 +9,10 @@ android {
9 compileSdkVersion 28 9 compileSdkVersion 28
10 defaultConfig { 10 defaultConfig {
11 applicationId "com.cnlive.strike" 11 applicationId "com.cnlive.strike"
12 - minSdkVersion 16  
13 - targetSdkVersion 27  
14 - versionCode 1  
15 - versionName "1.0" 12 + minSdkVersion rootProject.ext.minSdkVersion
  13 + targetSdkVersion rootProject.ext.targetSdkVersion
  14 + versionCode rootProject.ext.versionCode
  15 + versionName rootProject.ext.versionName
16 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 16 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
17 multiDexEnabled true 17 multiDexEnabled true
18 javaCompileOptions { 18 javaCompileOptions {
app/src/main/AndroidManifest.xml
@@ -13,9 +13,7 @@ @@ -13,9 +13,7 @@
13 android:roundIcon="@mipmap/ic_launcher_round" 13 android:roundIcon="@mipmap/ic_launcher_round"
14 android:supportsRtl="true" 14 android:supportsRtl="true"
15 android:theme="@style/AppTheme"> 15 android:theme="@style/AppTheme">
16 - <activity  
17 - android:name=".MainActivity"  
18 - android:theme="@style/Theme.AppCompat.Light.NoActionBar"> 16 + <activity android:name=".MainActivity">
19 <intent-filter> 17 <intent-filter>
20 <action android:name="android.intent.action.MAIN" /> 18 <action android:name="android.intent.action.MAIN" />
21 19
app/src/main/java/com/example/modulepedometer/MainActivity.java
@@ -9,6 +9,7 @@ import com.cnlive.moudle.collectionTrace.ui.activity.CollRunRaceDetailActivity; @@ -9,6 +9,7 @@ import com.cnlive.moudle.collectionTrace.ui.activity.CollRunRaceDetailActivity;
9 import com.cnlive.moudle.collectionTrace.ui.activity.CollRunningFinishActivity; 9 import com.cnlive.moudle.collectionTrace.ui.activity.CollRunningFinishActivity;
10 import com.cnlive.moudle.collectionTrace.ui.activity.RaceListActivity; 10 import com.cnlive.moudle.collectionTrace.ui.activity.RaceListActivity;
11 import com.cnlive.moudle.collectionTrace.ui.activity.RaceNameListActivity; 11 import com.cnlive.moudle.collectionTrace.ui.activity.RaceNameListActivity;
  12 +import com.cnlive.moudle.pedometer.model.Constant;
12 import com.cnlive.moudle.pedometer.ui.activity.MyRecordActivity; 13 import com.cnlive.moudle.pedometer.ui.activity.MyRecordActivity;
13 import com.cnlive.moudle.pedometer.ui.activity.RunLineActivity; 14 import com.cnlive.moudle.pedometer.ui.activity.RunLineActivity;
14 import com.cnlive.moudle.pedometer.ui.activity.SelfRecordActivity; 15 import com.cnlive.moudle.pedometer.ui.activity.SelfRecordActivity;
@@ -20,7 +21,10 @@ public class MainActivity extends AppCompatActivity { @@ -20,7 +21,10 @@ public class MainActivity extends AppCompatActivity {
20 protected void onCreate(Bundle savedInstanceState) { 21 protected void onCreate(Bundle savedInstanceState) {
21 super.onCreate(savedInstanceState); 22 super.onCreate(savedInstanceState);
22 setContentView(R.layout.activity_main); 23 setContentView(R.layout.activity_main);
  24 +
23 String uid = "358916"; 25 String uid = "358916";
  26 +// String uid = "358689";
  27 +
24 findViewById(R.id.recordd).setOnClickListener(new View.OnClickListener() { 28 findViewById(R.id.recordd).setOnClickListener(new View.OnClickListener() {
25 @Override 29 @Override
26 public void onClick(View v) { 30 public void onClick(View v) {
app/src/main/java/com/example/modulepedometer/MyApp.java
@@ -6,6 +6,7 @@ import com.alibaba.android.arouter.launcher.ARouter; @@ -6,6 +6,7 @@ import com.alibaba.android.arouter.launcher.ARouter;
6 import com.baidu.mapapi.CoordType; 6 import com.baidu.mapapi.CoordType;
7 import com.baidu.mapapi.SDKInitializer; 7 import com.baidu.mapapi.SDKInitializer;
8 import com.cnlive.libs.base.application.AppConfig; 8 import com.cnlive.libs.base.application.AppConfig;
  9 +import com.cnlive.moudle.pedometer.model.Constant;
9 10
10 public class MyApp extends Application { 11 public class MyApp extends Application {
11 @Override 12 @Override
@@ -15,6 +16,11 @@ public class MyApp extends Application { @@ -15,6 +16,11 @@ public class MyApp extends Application {
15 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,
16 0, BuildConfig.DEBUG, "", "", 17 0, BuildConfig.DEBUG, "", "",
17 userId, "", "", "", "", "", "", "", BuildConfig.BAIDU_MAP_APP_KEY); 18 userId, "", "", "", "", "", "", "", BuildConfig.BAIDU_MAP_APP_KEY);
  19 + if (AppConfig.isDebug()) {
  20 + Constant.SERVICE_ID = 213511;
  21 + } else {
  22 + Constant.SERVICE_ID = 214690;
  23 + }
18 initARouter(); 24 initARouter();
19 //在使用SDK各组件之前初始化context信息,传入ApplicationContext 25 //在使用SDK各组件之前初始化context信息,传入ApplicationContext
20 SDKInitializer.initialize(getApplicationContext()); 26 SDKInitializer.initialize(getApplicationContext());
config.gradle
@@ -21,7 +21,7 @@ ext { @@ -21,7 +21,7 @@ ext {
21 //编译方式 21 //编译方式
22 debug : false, 22 debug : false,
23 //版本号 23 //版本号
24 - version: "0.4.6", 24 + version: "0.6.15",
25 //Lib库前缀 25 //Lib库前缀
26 packeg : "com.cnlive.module", 26 packeg : "com.cnlive.module",
27 //Lib库名称 27 //Lib库名称
library_baidumap/src/main/java/com/cnlive/baidumap/BaiduMapMainActivity.java
@@ -7,7 +7,6 @@ import com.alibaba.android.arouter.facade.annotation.Route; @@ -7,7 +7,6 @@ import com.alibaba.android.arouter.facade.annotation.Route;
7 import com.baidu.mapapi.CoordType; 7 import com.baidu.mapapi.CoordType;
8 import com.baidu.mapapi.SDKInitializer; 8 import com.baidu.mapapi.SDKInitializer;
9 import com.example.moudle_baidumap.R; 9 import com.example.moudle_baidumap.R;
10 -@Route(path = "/moudle_baidumap/BaiduMapMainActivity")  
11 public class BaiduMapMainActivity extends AppCompatActivity { 10 public class BaiduMapMainActivity extends AppCompatActivity {
12 11
13 @Override 12 @Override
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/commonInfo/CollCommonInfo.java
@@ -5,6 +5,19 @@ import android.content.Context; @@ -5,6 +5,19 @@ import android.content.Context;
5 import com.cnlive.moudle.pedometer.utils.MySpHelper; 5 import com.cnlive.moudle.pedometer.utils.MySpHelper;
6 6
7 public class CollCommonInfo { 7 public class CollCommonInfo {
  8 + private static final String KEY_USER_ID = "collUserId";//用户ID
  9 + private static final String KEY_STEP_START_TIME = "collStepStartTime";//服务启动时间
  10 + private static final String KEY_WRITE_USER_STEP = "collWriteUserStep";//是否向数据库写入数据
  11 + private static final String KEY_IS_RUN_STEP_SERVICE = "collRunStepService";//是否运行计步服务
  12 + private static final String KEY_IS_RUN_KEEP_ALIVE_SERVICE = "collKeepAliveService";//是否运行保活服务
  13 + private static final String KEY_STREET_ID = "collStreetId";//赛事ID
  14 + private static final String KEY_IS_RUN_BAIDU_TRACE_SERVICE = "collRunBaiduTraceService";//是否运行百度鹰眼服务
  15 + private static final String KEY_IS_FIRST_STEP_SEND_TRACE_TIP = "collFirstStepSendTraceTip";//是否第一次启动鹰眼服务
  16 + private static final String KEY_USER_NICK_NAME = "collRunUserNickName";//用户昵称
  17 + private static final String KEY_USER_NICK_ICON = "collRunUserNickIcon";//用户头像
  18 +
  19 +
  20 +
8 21
9 /** 22 /**
10 * 设置计步时间 23 * 设置计步时间
@@ -12,7 +25,7 @@ public class CollCommonInfo { @@ -12,7 +25,7 @@ public class CollCommonInfo {
12 * @param context 25 * @param context
13 */ 26 */
14 public static void setStepStartTime(Context context, long currentTime) { 27 public static void setStepStartTime(Context context, long currentTime) {
15 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putLong("CollstepStartTime", currentTime); 28 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putLong(KEY_STEP_START_TIME, currentTime);
16 } 29 }
17 30
18 /** 31 /**
@@ -21,7 +34,7 @@ public class CollCommonInfo { @@ -21,7 +34,7 @@ public class CollCommonInfo {
21 * @param context 34 * @param context
22 */ 35 */
23 public static long getStepStartTime(Context context) { 36 public static long getStepStartTime(Context context) {
24 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getLong("CollstepStartTime", 0); 37 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getLong(KEY_STEP_START_TIME, 0);
25 } 38 }
26 39
27 /** 40 /**
@@ -30,7 +43,7 @@ public class CollCommonInfo { @@ -30,7 +43,7 @@ public class CollCommonInfo {
30 * @param context 43 * @param context
31 */ 44 */
32 public static void setIsWriteUserStep(Context context, boolean isAllow) { 45 public static void setIsWriteUserStep(Context context, boolean isAllow) {
33 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean("CollwriteUserStep:", isAllow); 46 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean(KEY_WRITE_USER_STEP, isAllow);
34 } 47 }
35 48
36 /** 49 /**
@@ -39,7 +52,7 @@ public class CollCommonInfo { @@ -39,7 +52,7 @@ public class CollCommonInfo {
39 * @param context 52 * @param context
40 */ 53 */
41 public static boolean getIsWriteUserStep(Context context) { 54 public static boolean getIsWriteUserStep(Context context) {
42 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean("CollwriteUserStep", true); 55 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean(KEY_WRITE_USER_STEP, true);
43 } 56 }
44 57
45 /** 58 /**
@@ -47,14 +60,14 @@ public class CollCommonInfo { @@ -47,14 +60,14 @@ public class CollCommonInfo {
47 * @param uid 60 * @param uid
48 */ 61 */
49 public static void setUserId(Context context, String uid) { 62 public static void setUserId(Context context, String uid) {
50 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString("ColluserId", uid); 63 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString(KEY_USER_ID, uid);
51 } 64 }
52 65
53 /** 66 /**
54 * @param context 67 * @param context
55 */ 68 */
56 public static String getUserId(Context context) { 69 public static String getUserId(Context context) {
57 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString("ColluserId", ""); 70 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString(KEY_USER_ID, "");
58 } 71 }
59 72
60 /** 73 /**
@@ -64,7 +77,7 @@ public class CollCommonInfo { @@ -64,7 +77,7 @@ public class CollCommonInfo {
64 * @param isAllow 77 * @param isAllow
65 */ 78 */
66 public static void setIsRunStepService(Context context, boolean isAllow) { 79 public static void setIsRunStepService(Context context, boolean isAllow) {
67 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean("CollrunStepService", isAllow); 80 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean(KEY_IS_RUN_STEP_SERVICE, isAllow);
68 81
69 } 82 }
70 83
@@ -75,7 +88,7 @@ public class CollCommonInfo { @@ -75,7 +88,7 @@ public class CollCommonInfo {
75 * @param isAllow 88 * @param isAllow
76 */ 89 */
77 public static void setIsRunKeepAliveService(Context context, boolean isAllow) { 90 public static void setIsRunKeepAliveService(Context context, boolean isAllow) {
78 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean("CollKeepAliveService", isAllow); 91 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean(KEY_IS_RUN_KEEP_ALIVE_SERVICE, isAllow);
79 92
80 } 93 }
81 94
@@ -85,7 +98,7 @@ public class CollCommonInfo { @@ -85,7 +98,7 @@ public class CollCommonInfo {
85 * @param context 98 * @param context
86 */ 99 */
87 public static boolean getIsRunKeepAliveService(Context context) { 100 public static boolean getIsRunKeepAliveService(Context context) {
88 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean("CollKeepAliveService", false); 101 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean(KEY_IS_RUN_KEEP_ALIVE_SERVICE, false);
89 } 102 }
90 103
91 /** 104 /**
@@ -94,7 +107,7 @@ public class CollCommonInfo { @@ -94,7 +107,7 @@ public class CollCommonInfo {
94 * @param context 107 * @param context
95 */ 108 */
96 public static boolean getIsRunStepService(Context context) { 109 public static boolean getIsRunStepService(Context context) {
97 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean("CollrunStepService", false); 110 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean(KEY_IS_RUN_STEP_SERVICE, false);
98 } 111 }
99 112
100 /** 113 /**
@@ -104,7 +117,7 @@ public class CollCommonInfo { @@ -104,7 +117,7 @@ public class CollCommonInfo {
104 * @param streetId 117 * @param streetId
105 */ 118 */
106 public static void setStreetId(Context context, String streetId) { 119 public static void setStreetId(Context context, String streetId) {
107 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString("CollstreetId", streetId); 120 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString(KEY_STREET_ID, streetId);
108 } 121 }
109 122
110 /** 123 /**
@@ -113,7 +126,7 @@ public class CollCommonInfo { @@ -113,7 +126,7 @@ public class CollCommonInfo {
113 * @param context 126 * @param context
114 */ 127 */
115 public static String getStreetId(Context context) { 128 public static String getStreetId(Context context) {
116 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString("CollstreetId", ""); 129 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString(KEY_STREET_ID, "");
117 } 130 }
118 131
119 /** 132 /**
@@ -123,7 +136,7 @@ public class CollCommonInfo { @@ -123,7 +136,7 @@ public class CollCommonInfo {
123 * @param isRun 136 * @param isRun
124 */ 137 */
125 public static void setTsRunBaiduTraceService(Context context, boolean isRun) { 138 public static void setTsRunBaiduTraceService(Context context, boolean isRun) {
126 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean("CollRunBaiduTraceService", isRun); 139 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean(KEY_IS_RUN_BAIDU_TRACE_SERVICE, isRun);
127 } 140 }
128 141
129 /** 142 /**
@@ -132,7 +145,7 @@ public class CollCommonInfo { @@ -132,7 +145,7 @@ public class CollCommonInfo {
132 * @param context 145 * @param context
133 */ 146 */
134 public static boolean getIsRunBaiduTraceService(Context context) { 147 public static boolean getIsRunBaiduTraceService(Context context) {
135 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean("CollRunBaiduTraceService", true); 148 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean(KEY_IS_RUN_BAIDU_TRACE_SERVICE, true);
136 } 149 }
137 150
138 /** 151 /**
@@ -142,7 +155,7 @@ public class CollCommonInfo { @@ -142,7 +155,7 @@ public class CollCommonInfo {
142 * @param isAllow 155 * @param isAllow
143 */ 156 */
144 public static void setIsFirstStepSendTraceTip(Context context, boolean isAllow) { 157 public static void setIsFirstStepSendTraceTip(Context context, boolean isAllow) {
145 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean("CollFirstStepSendTraceTip", isAllow); 158 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean(KEY_IS_FIRST_STEP_SEND_TRACE_TIP, isAllow);
146 } 159 }
147 160
148 /** 161 /**
@@ -152,7 +165,7 @@ public class CollCommonInfo { @@ -152,7 +165,7 @@ public class CollCommonInfo {
152 * @param context 165 * @param context
153 */ 166 */
154 public static boolean getIsFirstStepSendTraceTip(Context context) { 167 public static boolean getIsFirstStepSendTraceTip(Context context) {
155 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean("CollFirstStepSendTraceTip", true); 168 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean(KEY_IS_FIRST_STEP_SEND_TRACE_TIP, true);
156 } 169 }
157 170
158 /** 171 /**
@@ -162,7 +175,7 @@ public class CollCommonInfo { @@ -162,7 +175,7 @@ public class CollCommonInfo {
162 * @param nickName 175 * @param nickName
163 */ 176 */
164 public static void setUserNickName(Context context, String nickName) { 177 public static void setUserNickName(Context context, String nickName) {
165 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString("CollRunUserNickName", nickName); 178 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString(KEY_USER_NICK_NAME, nickName);
166 179
167 } 180 }
168 181
@@ -172,7 +185,7 @@ public class CollCommonInfo { @@ -172,7 +185,7 @@ public class CollCommonInfo {
172 * @param context 185 * @param context
173 */ 186 */
174 public static String getUserNickName(Context context) { 187 public static String getUserNickName(Context context) {
175 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString("CollRunUserNickName", ""); 188 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString(KEY_USER_NICK_NAME, "");
176 189
177 } 190 }
178 191
@@ -183,7 +196,7 @@ public class CollCommonInfo { @@ -183,7 +196,7 @@ public class CollCommonInfo {
183 * @param userIcon 196 * @param userIcon
184 */ 197 */
185 public static void setUserIcon(Context context, String userIcon) { 198 public static void setUserIcon(Context context, String userIcon) {
186 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString("CollRunUserNickIcon", userIcon); 199 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString(KEY_USER_NICK_ICON, userIcon);
187 200
188 } 201 }
189 202
@@ -193,7 +206,7 @@ public class CollCommonInfo { @@ -193,7 +206,7 @@ public class CollCommonInfo {
193 * @param context 206 * @param context
194 */ 207 */
195 public static String getUserIcon(Context context) { 208 public static String getUserIcon(Context context) {
196 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString("CollRunUserNickIcon", ""); 209 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString(KEY_USER_NICK_ICON, "");
197 210
198 } 211 }
199 212
@@ -202,13 +215,13 @@ public class CollCommonInfo { @@ -202,13 +215,13 @@ public class CollCommonInfo {
202 * @param context 215 * @param context
203 */ 216 */
204 public static void reset(Context context) { 217 public static void reset(Context context) {
205 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("CollwriteUserStep");  
206 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("CollstepStartTime");  
207 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("CollrunStepService");  
208 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("CollstepStartTime");  
209 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("CollKeepAliveService");  
210 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("CollRunBaiduTraceService");  
211 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("CollFirstStepSendTraceTip"); 218 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_WRITE_USER_STEP);
  219 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_STEP_START_TIME);
  220 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_IS_RUN_STEP_SERVICE);
  221 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_STEP_START_TIME);
  222 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_IS_RUN_KEEP_ALIVE_SERVICE);
  223 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_IS_RUN_BAIDU_TRACE_SERVICE);
  224 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_IS_FIRST_STEP_SEND_TRACE_TIP);
212 } 225 }
213 226
214 227
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/presenter/CollRunningFinishFragmetPresenter.java
@@ -66,12 +66,12 @@ public class CollRunningFinishFragmetPresenter extends MvpBasePresenter&lt;CollRunn @@ -66,12 +66,12 @@ public class CollRunningFinishFragmetPresenter extends MvpBasePresenter&lt;CollRunn
66 endPoint = GsonUtil.GsonToBean(userStepEntity.getCollEndPointData(), CollectPoint.class); 66 endPoint = GsonUtil.GsonToBean(userStepEntity.getCollEndPointData(), CollectPoint.class);
67 } 67 }
68 if (null != startPoint) { 68 if (null != startPoint) {
69 - collectPoints.add(0, startPoint); 69 +// collectPoints.add(0, startPoint);
70 //起点 70 //起点
71 paramsMap.put("startLocation", startPoint.getPointName()); 71 paramsMap.put("startLocation", startPoint.getPointName());
72 } 72 }
73 if (null != endPoint) { 73 if (null != endPoint) {
74 - collectPoints.add(endPoint); 74 +// collectPoints.add(endPoint);
75 // 终点 75 // 终点
76 paramsMap.put("endLocation", endPoint.getPointName()); 76 paramsMap.put("endLocation", endPoint.getPointName());
77 77
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/CollRunningMapFragmentView.java
@@ -42,6 +42,7 @@ import com.cnlive.moudle.collectionTrace.ui.fragment.CollRunningMapFragment; @@ -42,6 +42,7 @@ import com.cnlive.moudle.collectionTrace.ui.fragment.CollRunningMapFragment;
42 import com.cnlive.moudle.collectionTrace.commonInfo.CollCommonInfo; 42 import com.cnlive.moudle.collectionTrace.commonInfo.CollCommonInfo;
43 import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; 43 import com.cnlive.moudle.pedometer.commonInfo.CommonInfo;
44 import com.cnlive.moudle.pedometer.model.Constant; 44 import com.cnlive.moudle.pedometer.model.Constant;
  45 +import com.cnlive.moudle.pedometer.model.MessageEvent;
45 import com.cnlive.moudle.pedometer.net.bean.RunRaceDetailInfo; 46 import com.cnlive.moudle.pedometer.net.bean.RunRaceDetailInfo;
46 import com.cnlive.moudle.pedometer.service.StepService; 47 import com.cnlive.moudle.pedometer.service.StepService;
47 import com.cnlive.moudle.pedometer.sql.entity.CollUserStepEntity; 48 import com.cnlive.moudle.pedometer.sql.entity.CollUserStepEntity;
@@ -55,6 +56,8 @@ import com.cnlive.moudle.pedometer.utils.TimeUtil; @@ -55,6 +56,8 @@ import com.cnlive.moudle.pedometer.utils.TimeUtil;
55 import com.example.moudle_pedometer.R; 56 import com.example.moudle_pedometer.R;
56 import com.hannesdorfmann.mosby3.mvp.MvpView; 57 import com.hannesdorfmann.mosby3.mvp.MvpView;
57 58
  59 +import org.greenrobot.eventbus.EventBus;
  60 +
58 import java.util.ArrayList; 61 import java.util.ArrayList;
59 import java.util.List; 62 import java.util.List;
60 63
@@ -309,8 +312,8 @@ public class CollRunningMapFragmentView implements MvpView, SensorEventListener @@ -309,8 +312,8 @@ public class CollRunningMapFragmentView implements MvpView, SensorEventListener
309 private int updataCanTakePointCount() { 312 private int updataCanTakePointCount() {
310 //获取用户可打点的数量 313 //获取用户可打点的数量
311 int canTakePointCount = CollStepUtil.getCollImportPointSize(getContext(), CollCommonInfo.getUserId(getContext())); 314 int canTakePointCount = CollStepUtil.getCollImportPointSize(getContext(), CollCommonInfo.getUserId(getContext()));
312 - if (canTakePointCount < 98) {  
313 - canTakePointCount = 98 - canTakePointCount; 315 + if (canTakePointCount < Constant.TAKE_POINT_MAX_SIZE) {
  316 + canTakePointCount = Constant.TAKE_POINT_MAX_SIZE - canTakePointCount;
314 } else { 317 } else {
315 canTakePointCount = 0; 318 canTakePointCount = 0;
316 } 319 }
@@ -788,6 +791,8 @@ public class CollRunningMapFragmentView implements MvpView, SensorEventListener @@ -788,6 +791,8 @@ public class CollRunningMapFragmentView implements MvpView, SensorEventListener
788 if (mMapView != null) { 791 if (mMapView != null) {
789 mMapView.onResume(); 792 mMapView.onResume();
790 } 793 }
  794 + //保持最新的步数
  795 + EventBus.getDefault().post(new MessageEvent(Constant.COLL_SERVICE_STEP_COUNT_ONRESUME, ""));
791 } 796 }
792 797
793 public void onPause() { 798 public void onPause() {
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/StartTraceFragmentView.java
@@ -407,15 +407,18 @@ public class StartTraceFragmentView implements MvpView, SensorEventListener { @@ -407,15 +407,18 @@ public class StartTraceFragmentView implements MvpView, SensorEventListener {
407 } 407 }
408 if (isFirstLoc) { 408 if (isFirstLoc) {
409 isFirstLoc = false; 409 isFirstLoc = false;
410 - if (location.getRadius() > Constant.LOCA_ACCURACY) {  
411 - Toast.makeText(getContext(), "当前定位精度为:" + location.getRadius() + "米,请您移动至空旷地带!", Toast.LENGTH_SHORT).show();  
412 - }  
413 - } else {  
414 - //过滤定位精度  
415 - if (location.getRadius() > Constant.LOCA_ACCURACY) {  
416 - return;  
417 - } 410 + Toast.makeText(getContext(), "当前定位精度为:" + location.getRadius() + "米,请您移动至空旷地带!", Toast.LENGTH_SHORT).show();
  411 +
418 } 412 }
  413 +// if (location.getRadius() > Constant.LOCA_ACCURACY) {
  414 +// Toast.makeText(getContext(), "当前定位精度为:" + location.getRadius() + "米,请您移动至空旷地带!", Toast.LENGTH_SHORT).show();
  415 +// }
  416 +// } else {
  417 + //过滤定位精度
  418 + if (location.getRadius() > Constant.LOCA_ACCURACY) {
  419 + return;
  420 + }
  421 +// }
419 followMyLocation = new MyLocationData.Builder() 422 followMyLocation = new MyLocationData.Builder()
420 .accuracy(location.getRadius()) 423 .accuracy(location.getRadius())
421 // 此处设置开发者获取到的方向信息,顺时针0-360 424 // 此处设置开发者获取到的方向信息,顺时针0-360
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/service/CollKeepLiveService.java
@@ -47,6 +47,7 @@ public class CollKeepLiveService extends Service implements MediaPlayer.OnComple @@ -47,6 +47,7 @@ public class CollKeepLiveService extends Service implements MediaPlayer.OnComple
47 private final String TAG = "CollKeepLiveService"; 47 private final String TAG = "CollKeepLiveService";
48 private Handler handler; 48 private Handler handler;
49 private Runnable runnable; 49 private Runnable runnable;
  50 + private boolean isRegisterReceiver = false;
50 51
51 public CollKeepLiveService() { 52 public CollKeepLiveService() {
52 } 53 }
@@ -96,12 +97,16 @@ public class CollKeepLiveService extends Service implements MediaPlayer.OnComple @@ -96,12 +97,16 @@ public class CollKeepLiveService extends Service implements MediaPlayer.OnComple
96 IntentFilter intentFilter = new IntentFilter(); 97 IntentFilter intentFilter = new IntentFilter();
97 intentFilter.addAction(Intent.ACTION_SCREEN_OFF); 98 intentFilter.addAction(Intent.ACTION_SCREEN_OFF);
98 intentFilter.addAction(Intent.ACTION_SCREEN_ON); 99 intentFilter.addAction(Intent.ACTION_SCREEN_ON);
  100 + intentFilter.addAction(Intent.ACTION_TIME_CHANGED);
  101 + intentFilter.addAction(Intent.ACTION_TIME_TICK);
  102 + intentFilter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
99 // intentFilter.addAction(Intent.ACTION_BATTERY_CHANGED); 103 // intentFilter.addAction(Intent.ACTION_BATTERY_CHANGED);
100 // intentFilter.addAction(Intent.ACTION_TIME_CHANGED); 104 // intentFilter.addAction(Intent.ACTION_TIME_CHANGED);
101 // intentFilter.addAction(Intent.ACTION_POWER_CONNECTED); 105 // intentFilter.addAction(Intent.ACTION_POWER_CONNECTED);
102 // intentFilter.addAction(Intent.ACTION_POWER_DISCONNECTED); 106 // intentFilter.addAction(Intent.ACTION_POWER_DISCONNECTED);
103 intentFilter.addAction("com.cnlive.moudle.collectionTrace.receivers.CollServiceReceiver"); 107 intentFilter.addAction("com.cnlive.moudle.collectionTrace.receivers.CollServiceReceiver");
104 registerReceiver(myReceiver, intentFilter); 108 registerReceiver(myReceiver, intentFilter);
  109 + isRegisterReceiver = true;
105 } 110 }
106 111
107 /** 112 /**
@@ -212,7 +217,7 @@ public class CollKeepLiveService extends Service implements MediaPlayer.OnComple @@ -212,7 +217,7 @@ public class CollKeepLiveService extends Service implements MediaPlayer.OnComple
212 public void onDestroy() { 217 public void onDestroy() {
213 super.onDestroy(); 218 super.onDestroy();
214 try { 219 try {
215 - if (myReceiver != null) { 220 + if (myReceiver != null && isRegisterReceiver) {
216 unregisterReceiver(myReceiver); 221 unregisterReceiver(myReceiver);
217 } 222 }
218 } catch (Exception e) { 223 } catch (Exception e) {
@@ -228,7 +233,7 @@ public class CollKeepLiveService extends Service implements MediaPlayer.OnComple @@ -228,7 +233,7 @@ public class CollKeepLiveService extends Service implements MediaPlayer.OnComple
228 //发送重启广播 233 //发送重启广播
229 sendRestartBroadCast(); 234 sendRestartBroadCast();
230 } 235 }
231 - 236 + isRegisterReceiver = false;
232 237
233 } 238 }
234 239
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/service/CollStepService.java
@@ -229,7 +229,8 @@ public class CollStepService extends Service implements SensorEventListener { @@ -229,7 +229,8 @@ public class CollStepService extends Service implements SensorEventListener {
229 if (mClient != null) { 229 if (mClient != null) {
230 retryIndex = 0; 230 retryIndex = 0;
231 mClient.startGather(traceListener); 231 mClient.startGather(traceListener);
232 - Toast.makeText(getApplicationContext(), "开启轨迹服务", Toast.LENGTH_LONG).show(); 232 + Log.e(TAG, "开启轨迹服务" );
  233 +// Toast.makeText(getApplicationContext(), "开启轨迹服务", Toast.LENGTH_LONG).show();
233 boolean isFirstSendNotification = CollCommonInfo.getIsFirstStepSendTraceTip(getApplicationContext()); 234 boolean isFirstSendNotification = CollCommonInfo.getIsFirstStepSendTraceTip(getApplicationContext());
234 if (isFirstSendNotification) { 235 if (isFirstSendNotification) {
235 CollCommonInfo.setIsFirstStepSendTraceTip(getApplicationContext(), false); 236 CollCommonInfo.setIsFirstStepSendTraceTip(getApplicationContext(), false);
@@ -273,7 +274,8 @@ public class CollStepService extends Service implements SensorEventListener { @@ -273,7 +274,8 @@ public class CollStepService extends Service implements SensorEventListener {
273 if (StatusCodes.SUCCESS == errorNo || StatusCodes.CACHE_TRACK_NOT_UPLOAD == errorNo) { 274 if (StatusCodes.SUCCESS == errorNo || StatusCodes.CACHE_TRACK_NOT_UPLOAD == errorNo) {
274 if (mClient != null) { 275 if (mClient != null) {
275 mClient.stopTrace(mTrace, traceListener); 276 mClient.stopTrace(mTrace, traceListener);
276 - Toast.makeText(getApplicationContext(), "停止轨迹服务", Toast.LENGTH_LONG).show(); 277 + Log.e(TAG, "停止轨迹服务" );
  278 +// Toast.makeText(getApplicationContext(), "停止轨迹服务", Toast.LENGTH_LONG).show();
277 } 279 }
278 } 280 }
279 } 281 }
@@ -293,7 +295,8 @@ public class CollStepService extends Service implements SensorEventListener { @@ -293,7 +295,8 @@ public class CollStepService extends Service implements SensorEventListener {
293 Log.e(TAG, "onStartGatherCallback: " + message + "," + errorNo); 295 Log.e(TAG, "onStartGatherCallback: " + message + "," + errorNo);
294 if (StatusCodes.SUCCESS == errorNo || StatusCodes.GATHER_STARTED == errorNo) { 296 if (StatusCodes.SUCCESS == errorNo || StatusCodes.GATHER_STARTED == errorNo) {
295 retryIndex = 0; 297 retryIndex = 0;
296 - Toast.makeText(getApplicationContext(), "开始采集", Toast.LENGTH_LONG).show(); 298 + Log.e(TAG, "开始采集" );
  299 +// Toast.makeText(getApplicationContext(), "开始采集", Toast.LENGTH_LONG).show();
297 } else { 300 } else {
298 //重新开启采集 301 //重新开启采集
299 if (retryIndex < 4) { 302 if (retryIndex < 4) {
@@ -320,7 +323,8 @@ public class CollStepService extends Service implements SensorEventListener { @@ -320,7 +323,8 @@ public class CollStepService extends Service implements SensorEventListener {
320 @Override 323 @Override
321 public void onStopGatherCallback(int errorNo, String message) { 324 public void onStopGatherCallback(int errorNo, String message) {
322 if (StatusCodes.SUCCESS == errorNo || StatusCodes.GATHER_STOPPED == errorNo) { 325 if (StatusCodes.SUCCESS == errorNo || StatusCodes.GATHER_STOPPED == errorNo) {
323 - Toast.makeText(getApplicationContext(), "停止采集", Toast.LENGTH_LONG).show(); 326 + Log.e(TAG, "停止采集" );
  327 +// Toast.makeText(getApplicationContext(), "停止采集", Toast.LENGTH_LONG).show();
324 if (mClient != null) { 328 if (mClient != null) {
325 mClient.stopTrace(mTrace, traceListener); 329 mClient.stopTrace(mTrace, traceListener);
326 } 330 }
@@ -494,6 +498,12 @@ public class CollStepService extends Service implements SensorEventListener { @@ -494,6 +498,12 @@ public class CollStepService extends Service implements SensorEventListener {
494 // else if (messageEvent.getMessageType() == Constant.SERVICE_STEP_COUNT_CONTINUE) { 498 // else if (messageEvent.getMessageType() == Constant.SERVICE_STEP_COUNT_CONTINUE) {
495 // pauseFlag = false; 499 // pauseFlag = false;
496 // } 500 // }
  501 +
  502 + //更新锁屏步数
  503 + if (messageEvent.getMessageType() == Constant.COLL_SERVICE_STEP_COUNT_ONRESUME) {
  504 + updateNotification();
  505 + }
  506 +
497 } 507 }
498 508
499 /** 509 /**
@@ -559,6 +569,7 @@ public class CollStepService extends Service implements SensorEventListener { @@ -559,6 +569,7 @@ public class CollStepService extends Service implements SensorEventListener {
559 } 569 }
560 570
561 private void updateNotification() { 571 private void updateNotification() {
  572 + save();
562 // Log.e(TAG, "updateNotification: 当前步数:" + CURRENT_STEP); 573 // Log.e(TAG, "updateNotification: 当前步数:" + CURRENT_STEP);
563 EventBus.getDefault().post(new MessageEvent(Constant.COLL_SERVICE_STEP_COUNT_UPDATE, CURRENT_STEP)); 574 EventBus.getDefault().post(new MessageEvent(Constant.COLL_SERVICE_STEP_COUNT_UPDATE, CURRENT_STEP));
564 updateSpeedStepFlag = false; 575 updateSpeedStepFlag = false;
@@ -669,12 +680,12 @@ public class CollStepService extends Service implements SensorEventListener { @@ -669,12 +680,12 @@ public class CollStepService extends Service implements SensorEventListener {
669 } else if (Intent.ACTION_DATE_CHANGED.equals(action)) {//日期变化步数重置为0 680 } else if (Intent.ACTION_DATE_CHANGED.equals(action)) {//日期变化步数重置为0
670 // Logger.d("重置步数" + StepDcretor.CURRENT_STEP); 681 // Logger.d("重置步数" + StepDcretor.CURRENT_STEP);
671 save(); 682 save();
672 - isNewDay(); 683 +// isNewDay();
673 } else if (Intent.ACTION_TIME_CHANGED.equals(action)) { 684 } else if (Intent.ACTION_TIME_CHANGED.equals(action)) {
674 //时间变化步数重置为0 685 //时间变化步数重置为0
675 // isCall(); 686 // isCall();
676 save(); 687 save();
677 - isNewDay(); 688 +// isNewDay();
678 } else if (Intent.ACTION_TIME_TICK.equals(action)) {//日期变化步数重置为0 689 } else if (Intent.ACTION_TIME_TICK.equals(action)) {//日期变化步数重置为0
679 // isCall(); 690 // isCall();
680 // Logger.d("重置步数" + StepDcretor.CURRENT_STEP); 691 // Logger.d("重置步数" + StepDcretor.CURRENT_STEP);
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/ui/activity/RaceListActivity.java
@@ -37,8 +37,6 @@ public class RaceListActivity extends AppCompatActivity { @@ -37,8 +37,6 @@ public class RaceListActivity extends AppCompatActivity {
37 CommonInfo.setUserId(this,getIntent().getStringExtra("userId")); 37 CommonInfo.setUserId(this,getIntent().getStringExtra("userId"));
38 CommonInfo.setUserNickName(this,getIntent().getStringExtra("userName")); 38 CommonInfo.setUserNickName(this,getIntent().getStringExtra("userName"));
39 CommonInfo.setUserIcon(this,getIntent().getStringExtra("userIcon")); 39 CommonInfo.setUserIcon(this,getIntent().getStringExtra("userIcon"));
40 - }else {  
41 - CommonInfo.setUserId(this, "10513196");  
42 } 40 }
43 getSupportFragmentManager().beginTransaction().replace(R.id.race_container,new RaceListFragment()).commit(); 41 getSupportFragmentManager().beginTransaction().replace(R.id.race_container,new RaceListFragment()).commit();
44 } 42 }
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/ui/fragment/CollRunningMapFragment.java
@@ -186,7 +186,7 @@ public class CollRunningMapFragment extends QMUIFragment&lt;CollRunningMapFragmentV @@ -186,7 +186,7 @@ public class CollRunningMapFragment extends QMUIFragment&lt;CollRunningMapFragmentV
186 if (mVibrator != null) { 186 if (mVibrator != null) {
187 //设置震动周期,数组表示时间:等待+执行,单位是毫秒,下面操作代表:等待100,执行100,等待100,执行1000, 187 //设置震动周期,数组表示时间:等待+执行,单位是毫秒,下面操作代表:等待100,执行100,等待100,执行1000,
188 //后面的数字如果为-1代表不重复,之执行一次,其他代表会重复,0代表从数组的第0个位置开始 188 //后面的数字如果为-1代表不重复,之执行一次,其他代表会重复,0代表从数组的第0个位置开始
189 - mVibrator.vibrate(new long[]{100, 1000, 100, 1000}, -1); 189 + mVibrator.vibrate(new long[]{Constant.VIBRATOR_DELAY_TIME, Constant.VIBRATOR_RUN_TIME, Constant.VIBRATOR_DELAY_TIME, Constant.VIBRATOR_RUN_TIME}, Constant.VIBRATOR_REPEAT_TIME);
190 } 190 }
191 if (tipDialog != null) { 191 if (tipDialog != null) {
192 tipDialog.show(); 192 tipDialog.show();
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/ui/fragment/StartTraceFragment.java
@@ -7,6 +7,8 @@ import android.support.annotation.Nullable; @@ -7,6 +7,8 @@ import android.support.annotation.Nullable;
7 import android.view.View; 7 import android.view.View;
8 8
9 import com.cnlive.libs.base.ui.QMUIFragment; 9 import com.cnlive.libs.base.ui.QMUIFragment;
  10 +import com.cnlive.libs.base.util.StatusBarUtil;
  11 +import com.cnlive.libs.base.util.StatusBarUtil2;
10 import com.cnlive.moudle.collectionTrace.frame.presenter.StartTraceFragmentPresenter; 12 import com.cnlive.moudle.collectionTrace.frame.presenter.StartTraceFragmentPresenter;
11 import com.cnlive.moudle.collectionTrace.frame.view.StartTraceFragmentView; 13 import com.cnlive.moudle.collectionTrace.frame.view.StartTraceFragmentView;
12 import com.cnlive.moudle.collectionTrace.ui.activity.CollPedometerMainActivity; 14 import com.cnlive.moudle.collectionTrace.ui.activity.CollPedometerMainActivity;
@@ -55,6 +57,8 @@ public class StartTraceFragment extends QMUIFragment&lt;StartTraceFragmentView, Sta @@ -55,6 +57,8 @@ public class StartTraceFragment extends QMUIFragment&lt;StartTraceFragmentView, Sta
55 @Override 57 @Override
56 public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { 58 public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
57 super.onViewCreated(view, savedInstanceState); 59 super.onViewCreated(view, savedInstanceState);
  60 + StatusBarUtil.setStatusBarWrite(getActivity());
  61 + StatusBarUtil2.setColor(getActivity(), getResources().getColor(R.color.white), 0);
58 EventBus.getDefault().register(this); 62 EventBus.getDefault().register(this);
59 mSensorManager = (SensorManager) getActivity().getSystemService(SENSOR_SERVICE);//获取传感器管理服务 63 mSensorManager = (SensorManager) getActivity().getSystemService(SENSOR_SERVICE);//获取传感器管理服务
60 if (null != getArguments()) { 64 if (null != getArguments()) {
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/utils/CollStepUtil.java
@@ -6,6 +6,7 @@ import android.util.Log; @@ -6,6 +6,7 @@ import android.util.Log;
6 6
7 import com.baidu.mapapi.model.LatLng; 7 import com.baidu.mapapi.model.LatLng;
8 import com.cnlive.moudle.collectionTrace.model.CollectPoint; 8 import com.cnlive.moudle.collectionTrace.model.CollectPoint;
  9 +import com.cnlive.moudle.pedometer.model.Constant;
9 import com.cnlive.moudle.pedometer.sql.dao.CollUserStepEntityDao; 10 import com.cnlive.moudle.pedometer.sql.dao.CollUserStepEntityDao;
10 import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao; 11 import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao;
11 import com.cnlive.moudle.pedometer.sql.db.DbCore; 12 import com.cnlive.moudle.pedometer.sql.db.DbCore;
@@ -190,10 +191,10 @@ public class CollStepUtil { @@ -190,10 +191,10 @@ public class CollStepUtil {
190 } 191 }
191 } 192 }
192 } 193 }
193 - return 98; 194 + return Constant.TAKE_POINT_MAX_SIZE;
194 } catch (Exception e) { 195 } catch (Exception e) {
195 Log.e(TAG, "getCollImportPointSize: " + e.getMessage()); 196 Log.e(TAG, "getCollImportPointSize: " + e.getMessage());
196 - return 98; 197 + return Constant.TAKE_POINT_MAX_SIZE;
197 } 198 }
198 199
199 } 200 }
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/commonInfo/CommonInfo.java
@@ -6,24 +6,19 @@ import com.cnlive.moudle.pedometer.utils.MySpHelper; @@ -6,24 +6,19 @@ import com.cnlive.moudle.pedometer.utils.MySpHelper;
6 import com.cnlive.moudle.pedometer.utils.TimeUtil; 6 import com.cnlive.moudle.pedometer.utils.TimeUtil;
7 7
8 public class CommonInfo { 8 public class CommonInfo {
9 -  
10 -// /**  
11 -// * 设置计步时间  
12 -// *  
13 -// * @param context  
14 -// */  
15 -// public static void setStepStartTime(Context context, long currentTime) {  
16 -// MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putLong("stepStartTime", currentTime);  
17 -// }  
18 -//  
19 -// /**  
20 -// * 获取计步时间  
21 -// *  
22 -// * @param context  
23 -// */  
24 -// public static long getStepStartTime(Context context) {  
25 -// return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getLong("stepStartTime", 0);  
26 -// } 9 + private static final String KEY_USER_ID = "runUserId";//用户ID
  10 + private static final String KEY_WRITE_USER_STEP = "runWriteUserStep";//是否允许写入步数
  11 + private static final String KEY_RUN_WRITE_USER_STEP = "runStepService";//是否运行计步服务
  12 + private static final String KEY_KEEP_ALIVE_SERVICE = "runKeepAliveService";//是否运行保活服务
  13 + private static final String KEY_EVENT_ID = "runStreetId";//赛事id
  14 + private static final String KEY_RUN_BAIDU_TRACE_SERVICE = "runBaiduTraceService";//是否运行百度服务
  15 + private static final String KEY_FIRST_STEP_SEND_TIP = "runFirstStepSendTraceTip";//是否是第一次启动鹰眼服务
  16 + private static final String KEY_FENCE_ID = "runFenceId";//围栏ID
  17 + private static final String KEY_USER_NICK_NAME = "runUserNickName";//用户昵称
  18 + private static final String KEY_USER_NICK_ICON = "runUserNickIcon";//用户头像
  19 + private static final String KEY_USER_PHONE = "runUserPhone";//用户电话
  20 + private static final String KEY_IS_FIRST_SHOW_TIME_TIP = "runIsFirstShowTimeTip";//是否是第一次显示倒计时
  21 + private static final String KEY_IS_PAUSE_STATE = "runIsPauseState";//是否点击暂停按钮
27 22
28 23
29 /** 24 /**
@@ -32,7 +27,7 @@ public class CommonInfo { @@ -32,7 +27,7 @@ public class CommonInfo {
32 * @param context 27 * @param context
33 */ 28 */
34 public static void setIsWriteUserStep(Context context, boolean isAllow) { 29 public static void setIsWriteUserStep(Context context, boolean isAllow) {
35 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean("writeUserStep:", isAllow); 30 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean(KEY_WRITE_USER_STEP, isAllow);
36 } 31 }
37 32
38 /** 33 /**
@@ -41,7 +36,7 @@ public class CommonInfo { @@ -41,7 +36,7 @@ public class CommonInfo {
41 * @param context 36 * @param context
42 */ 37 */
43 public static boolean getIsWriteUserStep(Context context) { 38 public static boolean getIsWriteUserStep(Context context) {
44 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean("writeUserStep", true); 39 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean(KEY_WRITE_USER_STEP, true);
45 } 40 }
46 41
47 /** 42 /**
@@ -49,14 +44,14 @@ public class CommonInfo { @@ -49,14 +44,14 @@ public class CommonInfo {
49 * @param uid 44 * @param uid
50 */ 45 */
51 public static void setUserId(Context context, String uid) { 46 public static void setUserId(Context context, String uid) {
52 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString("userId", uid); 47 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString(KEY_USER_ID, uid);
53 } 48 }
54 49
55 /** 50 /**
56 * @param context 51 * @param context
57 */ 52 */
58 public static String getUserId(Context context) { 53 public static String getUserId(Context context) {
59 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString("userId", ""); 54 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString(KEY_USER_ID, "");
60 } 55 }
61 56
62 /** 57 /**
@@ -66,7 +61,7 @@ public class CommonInfo { @@ -66,7 +61,7 @@ public class CommonInfo {
66 * @param isAllow 61 * @param isAllow
67 */ 62 */
68 public static void setIsRunStepService(Context context, boolean isAllow) { 63 public static void setIsRunStepService(Context context, boolean isAllow) {
69 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean("runStepService", isAllow); 64 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean(KEY_RUN_WRITE_USER_STEP, isAllow);
70 65
71 } 66 }
72 67
@@ -77,7 +72,7 @@ public class CommonInfo { @@ -77,7 +72,7 @@ public class CommonInfo {
77 * @param isAllow 72 * @param isAllow
78 */ 73 */
79 public static void setIsRunKeepAliveService(Context context, boolean isAllow) { 74 public static void setIsRunKeepAliveService(Context context, boolean isAllow) {
80 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean("KeepAliveService", isAllow); 75 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean(KEY_KEEP_ALIVE_SERVICE, isAllow);
81 76
82 } 77 }
83 78
@@ -87,7 +82,7 @@ public class CommonInfo { @@ -87,7 +82,7 @@ public class CommonInfo {
87 * @param context 82 * @param context
88 */ 83 */
89 public static boolean getIsRunKeepAliveService(Context context) { 84 public static boolean getIsRunKeepAliveService(Context context) {
90 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean("KeepAliveService", false); 85 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean(KEY_KEEP_ALIVE_SERVICE, false);
91 } 86 }
92 87
93 /** 88 /**
@@ -96,7 +91,7 @@ public class CommonInfo { @@ -96,7 +91,7 @@ public class CommonInfo {
96 * @param context 91 * @param context
97 */ 92 */
98 public static boolean getIsRunStepService(Context context) { 93 public static boolean getIsRunStepService(Context context) {
99 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean("runStepService", false); 94 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean(KEY_RUN_WRITE_USER_STEP, false);
100 } 95 }
101 96
102 /** 97 /**
@@ -106,7 +101,7 @@ public class CommonInfo { @@ -106,7 +101,7 @@ public class CommonInfo {
106 * @param streetId 101 * @param streetId
107 */ 102 */
108 public static void setStreetId(Context context, String streetId) { 103 public static void setStreetId(Context context, String streetId) {
109 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString("streetId", streetId); 104 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString(KEY_EVENT_ID, streetId);
110 } 105 }
111 106
112 /** 107 /**
@@ -115,7 +110,7 @@ public class CommonInfo { @@ -115,7 +110,7 @@ public class CommonInfo {
115 * @param context 110 * @param context
116 */ 111 */
117 public static String getStreetId(Context context) { 112 public static String getStreetId(Context context) {
118 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString("streetId", ""); 113 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString(KEY_EVENT_ID, "");
119 } 114 }
120 115
121 /** 116 /**
@@ -125,7 +120,7 @@ public class CommonInfo { @@ -125,7 +120,7 @@ public class CommonInfo {
125 * @param isRun 120 * @param isRun
126 */ 121 */
127 public static void setTsRunBaiduTraceService(Context context, boolean isRun) { 122 public static void setTsRunBaiduTraceService(Context context, boolean isRun) {
128 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean("RunBaiduTraceService", isRun); 123 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean(KEY_RUN_BAIDU_TRACE_SERVICE, isRun);
129 } 124 }
130 125
131 /** 126 /**
@@ -134,7 +129,7 @@ public class CommonInfo { @@ -134,7 +129,7 @@ public class CommonInfo {
134 * @param context 129 * @param context
135 */ 130 */
136 public static boolean getIsRunBaiduTraceService(Context context) { 131 public static boolean getIsRunBaiduTraceService(Context context) {
137 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean("RunBaiduTraceService", true); 132 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean(KEY_RUN_BAIDU_TRACE_SERVICE, true);
138 } 133 }
139 134
140 /** 135 /**
@@ -144,7 +139,7 @@ public class CommonInfo { @@ -144,7 +139,7 @@ public class CommonInfo {
144 * @param isAllow 139 * @param isAllow
145 */ 140 */
146 public static void setIsFirstStepSendTraceTip(Context context, boolean isAllow) { 141 public static void setIsFirstStepSendTraceTip(Context context, boolean isAllow) {
147 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean("FirstStepSendTraceTip", isAllow); 142 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean(KEY_FIRST_STEP_SEND_TIP, isAllow);
148 } 143 }
149 144
150 /** 145 /**
@@ -154,7 +149,7 @@ public class CommonInfo { @@ -154,7 +149,7 @@ public class CommonInfo {
154 * @param context 149 * @param context
155 */ 150 */
156 public static boolean getIsFirstStepSendTraceTip(Context context) { 151 public static boolean getIsFirstStepSendTraceTip(Context context) {
157 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean("FirstStepSendTraceTip", true); 152 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean(KEY_FIRST_STEP_SEND_TIP, true);
158 } 153 }
159 154
160 /** 155 /**
@@ -164,7 +159,7 @@ public class CommonInfo { @@ -164,7 +159,7 @@ public class CommonInfo {
164 * @param id 159 * @param id
165 */ 160 */
166 public static void setFenceId(Context context, int id) { 161 public static void setFenceId(Context context, int id) {
167 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putInt("FenceId", id); 162 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putInt(KEY_FENCE_ID, id);
168 } 163 }
169 164
170 /** 165 /**
@@ -173,7 +168,7 @@ public class CommonInfo { @@ -173,7 +168,7 @@ public class CommonInfo {
173 * @param context 168 * @param context
174 */ 169 */
175 public static int getFenceId(Context context) { 170 public static int getFenceId(Context context) {
176 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getInt("FenceId", -1); 171 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getInt(KEY_FENCE_ID, -1);
177 } 172 }
178 173
179 /** 174 /**
@@ -183,7 +178,7 @@ public class CommonInfo { @@ -183,7 +178,7 @@ public class CommonInfo {
183 * @param nickName 178 * @param nickName
184 */ 179 */
185 public static void setUserNickName(Context context, String nickName) { 180 public static void setUserNickName(Context context, String nickName) {
186 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString("RunUserNickName", nickName); 181 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString(KEY_USER_NICK_NAME, nickName);
187 182
188 } 183 }
189 184
@@ -193,7 +188,7 @@ public class CommonInfo { @@ -193,7 +188,7 @@ public class CommonInfo {
193 * @param context 188 * @param context
194 */ 189 */
195 public static String getUserNickName(Context context) { 190 public static String getUserNickName(Context context) {
196 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString("RunUserNickName", ""); 191 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString(KEY_USER_NICK_NAME, "");
197 192
198 } 193 }
199 194
@@ -204,7 +199,7 @@ public class CommonInfo { @@ -204,7 +199,7 @@ public class CommonInfo {
204 * @param userIcon 199 * @param userIcon
205 */ 200 */
206 public static void setUserIcon(Context context, String userIcon) { 201 public static void setUserIcon(Context context, String userIcon) {
207 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString("RunUserNickIcon", userIcon); 202 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString(KEY_USER_NICK_ICON, userIcon);
208 203
209 } 204 }
210 205
@@ -214,7 +209,7 @@ public class CommonInfo { @@ -214,7 +209,7 @@ public class CommonInfo {
214 * @param context 209 * @param context
215 */ 210 */
216 public static String getUserIcon(Context context) { 211 public static String getUserIcon(Context context) {
217 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString("RunUserNickIcon", ""); 212 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString(KEY_USER_NICK_ICON, "");
218 213
219 } 214 }
220 215
@@ -225,7 +220,7 @@ public class CommonInfo { @@ -225,7 +220,7 @@ public class CommonInfo {
225 * @param userIcon 220 * @param userIcon
226 */ 221 */
227 public static void setUserPhone(Context context, String userIcon) { 222 public static void setUserPhone(Context context, String userIcon) {
228 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString("RunUserPhone", userIcon); 223 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString(KEY_USER_PHONE, userIcon);
229 224
230 } 225 }
231 226
@@ -235,7 +230,7 @@ public class CommonInfo { @@ -235,7 +230,7 @@ public class CommonInfo {
235 * @param context 230 * @param context
236 */ 231 */
237 public static String getUserPhone(Context context) { 232 public static String getUserPhone(Context context) {
238 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString("RunUserPhone", ""); 233 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString(KEY_USER_PHONE, "");
239 234
240 } 235 }
241 236
@@ -247,7 +242,7 @@ public class CommonInfo { @@ -247,7 +242,7 @@ public class CommonInfo {
247 * @param isAllow 242 * @param isAllow
248 */ 243 */
249 public static void setIsFirstShowTimeTip(Context context, boolean isAllow) { 244 public static void setIsFirstShowTimeTip(Context context, boolean isAllow) {
250 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean("IsFirstShowTimeTip", isAllow); 245 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean(KEY_IS_FIRST_SHOW_TIME_TIP, isAllow);
251 } 246 }
252 247
253 /** 248 /**
@@ -256,7 +251,7 @@ public class CommonInfo { @@ -256,7 +251,7 @@ public class CommonInfo {
256 * @param context 251 * @param context
257 */ 252 */
258 public static boolean getIsFirstShowTimeTip(Context context) { 253 public static boolean getIsFirstShowTimeTip(Context context) {
259 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean("IsFirstShowTimeTip", true); 254 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean(KEY_IS_FIRST_SHOW_TIME_TIP, true);
260 } 255 }
261 256
262 /** 257 /**
@@ -266,7 +261,7 @@ public class CommonInfo { @@ -266,7 +261,7 @@ public class CommonInfo {
266 * @param isAllow 261 * @param isAllow
267 */ 262 */
268 public static void setIsPauseState(Context context, boolean isAllow) { 263 public static void setIsPauseState(Context context, boolean isAllow) {
269 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean("runIsPauseState", isAllow); 264 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putBoolean(KEY_IS_PAUSE_STATE, isAllow);
270 } 265 }
271 266
272 /** 267 /**
@@ -275,68 +270,23 @@ public class CommonInfo { @@ -275,68 +270,23 @@ public class CommonInfo {
275 * @param context 270 * @param context
276 */ 271 */
277 public static boolean getIsPause(Context context) { 272 public static boolean getIsPause(Context context) {
278 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean("runIsPauseState", false); 273 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean(KEY_IS_PAUSE_STATE, false);
279 } 274 }
280 275
281 -  
282 -// /**  
283 -// * 设置赛事标题  
284 -// *  
285 -// * @param context  
286 -// * @param streetTitle  
287 -// */  
288 -// public static void setStreetTitle(Context context, String streetTitle) {  
289 -// MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString("runStreetTitle", streetTitle);  
290 -//  
291 -// }  
292 -//  
293 -// /**  
294 -// * 获取赛事标题  
295 -// *  
296 -// * @param context  
297 -// */  
298 -// public static String getStreetTitle(Context context) {  
299 -// return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString("runStreetTitle", "");  
300 -//  
301 -// }  
302 -  
303 - // /**  
304 -// * 设置起点经纬度  
305 -// *  
306 -// * @param context  
307 -// * @param startLatLng  
308 -// */  
309 -// public static void setStartLatLng(Context context, String startLatLng) {  
310 -// MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString("runStartLatLng", startLatLng);  
311 -//  
312 -// }  
313 -//  
314 -// /**  
315 -// * 设置终点经纬度  
316 -// *  
317 -// * @param context  
318 -// * @param endLatLng  
319 -// */  
320 -// public static void setEndLatLng(Context context, String endLatLng) {  
321 -// MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString("runEndLatLng", endLatLng);  
322 -//  
323 -// }  
324 /*重置 276 /*重置
325 * @param context 277 * @param context
326 */ 278 */
327 public static void reset(Context context) { 279 public static void reset(Context context) {
328 280
329 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("IsFirstShowTimeTip");  
330 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("writeUserStep");  
331 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("runStepService");  
332 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("KeepAliveService");  
333 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("RunBaiduTraceService");  
334 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("streetId");  
335 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("FirstStepSendTraceTip");  
336 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("FenceId");  
337 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("IsFirstShowTimeTip");  
338 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("runIsPauseState");  
339 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("runStreetTitle"); 281 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_WRITE_USER_STEP);
  282 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_RUN_WRITE_USER_STEP);
  283 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_KEEP_ALIVE_SERVICE);
  284 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_RUN_BAIDU_TRACE_SERVICE);
  285 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_EVENT_ID);
  286 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_FIRST_STEP_SEND_TIP);
  287 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_FENCE_ID);
  288 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_IS_FIRST_SHOW_TIME_TIP);
  289 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_IS_PAUSE_STATE);
340 290
341 291
342 } 292 }
@@ -345,14 +295,13 @@ public class CommonInfo { @@ -345,14 +295,13 @@ public class CommonInfo {
345 * @param context 295 * @param context
346 */ 296 */
347 public static void resetRace(Context context) { 297 public static void resetRace(Context context) {
348 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("IsFirstShowTimeTip");  
349 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("writeUserStep");  
350 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("runStepService");  
351 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("KeepAliveService");  
352 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("RunBaiduTraceService");  
353 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("FirstStepSendTraceTip");  
354 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("IsFirstShowTimeTip");  
355 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("runIsPauseState"); 298 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_WRITE_USER_STEP);
  299 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_RUN_WRITE_USER_STEP);
  300 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_KEEP_ALIVE_SERVICE);
  301 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_RUN_BAIDU_TRACE_SERVICE);
  302 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_FIRST_STEP_SEND_TIP);
  303 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_IS_FIRST_SHOW_TIME_TIP);
  304 + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey(KEY_IS_PAUSE_STATE);
356 305
357 } 306 }
358 } 307 }
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/presenter/ALLScoreDetailFragmentPresenter.java
@@ -74,7 +74,7 @@ public class ALLScoreDetailFragmentPresenter extends MvpBasePresenter&lt;ALLScoreDe @@ -74,7 +74,7 @@ public class ALLScoreDetailFragmentPresenter extends MvpBasePresenter&lt;ALLScoreDe
74 else { 74 else {
75 MyMapUtil.drawHistoryTrack(context, getView().baiduMap, resultPoints, SortType.asc, R.color.red, R.drawable.icon_start, R.drawable.icon_end); 75 MyMapUtil.drawHistoryTrack(context, getView().baiduMap, resultPoints, SortType.asc, R.color.red, R.drawable.icon_start, R.drawable.icon_end);
76 //设置地图自动缩放 76 //设置地图自动缩放
77 - MyMapUtil.setMapAutoZoom(getView().baiduMap, resultPoints, -2f); 77 + MyMapUtil.setMapAutoZoom(getView().baiduMap, resultPoints, -0.8f);
78 } 78 }
79 } 79 }
80 80
@@ -97,7 +97,7 @@ public class ALLScoreDetailFragmentPresenter extends MvpBasePresenter&lt;ALLScoreDe @@ -97,7 +97,7 @@ public class ALLScoreDetailFragmentPresenter extends MvpBasePresenter&lt;ALLScoreDe
97 MyMapUtil.drawHistoryTrack(context, getView().baiduMap, resultPoints, SortType.asc, R.color.red, 0, R.drawable.icon_end); 97 MyMapUtil.drawHistoryTrack(context, getView().baiduMap, resultPoints, SortType.asc, R.color.red, 0, R.drawable.icon_end);
98 //设置地图自动缩放 98 //设置地图自动缩放
99 allResultList.addAll(resultPoints); 99 allResultList.addAll(resultPoints);
100 - MyMapUtil.setMapAutoZoom(getView().baiduMap, allResultList, -2f); 100 + MyMapUtil.setMapAutoZoom(getView().baiduMap, allResultList, -0.8f);
101 } 101 }
102 } 102 }
103 }); 103 });
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/presenter/RegistrationInfoPresenter.java
@@ -55,7 +55,13 @@ public class RegistrationInfoPresenter extends MvpBasePresenter&lt;RegistrationInfo @@ -55,7 +55,13 @@ public class RegistrationInfoPresenter extends MvpBasePresenter&lt;RegistrationInfo
55 }).<BaseInfo>event().setFailureCallback(new FailureCallback() { 55 }).<BaseInfo>event().setFailureCallback(new FailureCallback() {
56 @Override 56 @Override
57 public void onFailure(int code, String message) { 57 public void onFailure(int code, String message) {
58 - Toast.makeText(context, "报名失败", Toast.LENGTH_LONG).show(); 58 +// if (408 == code) {
  59 +// if (getView() != null) {
  60 +// getView().toResult();
  61 +// }
  62 +// } else {
  63 + Toast.makeText(context, "报名失败", Toast.LENGTH_LONG).show();
  64 +// }
59 } 65 }
60 }).setSuccessCallback(new SuccessCallback<BaseInfo>() { 66 }).setSuccessCallback(new SuccessCallback<BaseInfo>() {
61 @Override 67 @Override
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/presenter/RunningFinishFragmetPresenter.java
@@ -7,6 +7,7 @@ import android.util.Log; @@ -7,6 +7,7 @@ import android.util.Log;
7 import android.widget.Toast; 7 import android.widget.Toast;
8 8
9 import com.baidu.mapapi.model.LatLng; 9 import com.baidu.mapapi.model.LatLng;
  10 +import com.baidu.mapapi.utils.DistanceUtil;
10 import com.baidu.trace.LBSTraceClient; 11 import com.baidu.trace.LBSTraceClient;
11 import com.baidu.trace.model.SortType; 12 import com.baidu.trace.model.SortType;
12 import com.cnlive.libs.base.logic.Logic; 13 import com.cnlive.libs.base.logic.Logic;
@@ -211,7 +212,7 @@ public class RunningFinishFragmetPresenter extends MvpBasePresenter&lt;RunningFinis @@ -211,7 +212,7 @@ public class RunningFinishFragmetPresenter extends MvpBasePresenter&lt;RunningFinis
211 //判断用户是否点击暂停按钮 212 //判断用户是否点击暂停按钮
212 if (userStepEntity.getPauseCount() == 0) { 213 if (userStepEntity.getPauseCount() == 0) {
213 MyMapUtil.drawHistoryTrack(context, getView().baiduMap, resultPoints, SortType.asc, R.color.red, R.drawable.icon_start, R.drawable.icon_end); 214 MyMapUtil.drawHistoryTrack(context, getView().baiduMap, resultPoints, SortType.asc, R.color.red, R.drawable.icon_start, R.drawable.icon_end);
214 - MyMapUtil.setMapAutoZoom(getView().baiduMap, resultPoints, -2f); 215 + MyMapUtil.setMapAutoZoom(getView().baiduMap, resultPoints, -1.5f);
215 216
216 //没有点击暂停 217 //没有点击暂停
217 //先判断是否到达终点 218 //先判断是否到达终点
@@ -270,9 +271,41 @@ public class RunningFinishFragmetPresenter extends MvpBasePresenter&lt;RunningFinis @@ -270,9 +271,41 @@ public class RunningFinishFragmetPresenter extends MvpBasePresenter&lt;RunningFinis
270 * @param context 271 * @param context
271 */ 272 */
272 public void checkUserIsFinish(List<LatLng> resultPoints, UserStepEntity userStepEntity, RunningFinishBean runningFinishBean, Activity context) { 273 public void checkUserIsFinish(List<LatLng> resultPoints, UserStepEntity userStepEntity, RunningFinishBean runningFinishBean, Activity context) {
  274 + boolean isArrive = false;
  275 + FailedEntity failedEntity = null;
  276 + if (!TextUtils.isEmpty(runningFinishBean.getFailUUID())) {
  277 + StepUtil.getTempSaveFailByUUID(context, CommonInfo.getUserId(context), runningFinishBean.getFailUUID());
  278 + }
273 if (!userStepEntity.getIsArriveEndPoint()) { 279 if (!userStepEntity.getIsArriveEndPoint()) {
274 runningFinishBean.setIsFinish("0"); 280 runningFinishBean.setIsFinish("0");
  281 + isArrive = false;
  282 + if (null != failedEntity) {
  283 + failedEntity.setIsArriveEndPoint(false);
  284 + StepUtil.updateFailData(context, failedEntity);
  285 + }
  286 + //在判断一次历史轨迹
  287 + if (null != resultPoints && resultPoints.size() > 1) {
  288 + if (!TextUtils.isEmpty(userStepEntity.getEndLatLng())) {
  289 + LatLng endLat = GsonUtil.GsonToBean(userStepEntity.getEndLatLng(), LatLng.class);
  290 + if (null != endLat) {
  291 + for (int i = 0; i < resultPoints.size(); i++) {
  292 + double distance = DistanceUtil.getDistance(endLat, resultPoints.get(i));
  293 + if (distance < Constant.LOCA_END_POINT_ACCURACY) {
  294 + isArrive = true;
  295 + if (null != failedEntity) {
  296 + failedEntity.setIsArriveEndPoint(true);
  297 + StepUtil.updateFailData(context, failedEntity);
  298 + }
  299 + break;
  300 + }
  301 + }
  302 + }
  303 + }
  304 + }
275 } else { 305 } else {
  306 + isArrive = true;
  307 + }
  308 + if (isArrive) {
276 if (importPoints != null) { 309 if (importPoints != null) {
277 //判断是否完成 310 //判断是否完成
278 boolean isFinish = MyMapUtil.checkIsFinishTrace(importPoints, resultPoints, Constant.PASS_RATE); 311 boolean isFinish = MyMapUtil.checkIsFinishTrace(importPoints, resultPoints, Constant.PASS_RATE);
@@ -284,6 +317,11 @@ public class RunningFinishFragmetPresenter extends MvpBasePresenter&lt;RunningFinis @@ -284,6 +317,11 @@ public class RunningFinishFragmetPresenter extends MvpBasePresenter&lt;RunningFinis
284 runningFinishBean.setIsFinish("0"); 317 runningFinishBean.setIsFinish("0");
285 } 318 }
286 } 319 }
  320 + } else {
  321 + runningFinishBean.setIsFinish("0");
  322 + }
  323 + if (null != getView()) {
  324 + getView().updataIsFinish(runningFinishBean);
287 } 325 }
288 } 326 }
289 327
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/presenter/RunningMapFragmentPresenter.java
@@ -72,8 +72,8 @@ public class RunningMapFragmentPresenter extends MvpBasePresenter&lt;RunningMapFrag @@ -72,8 +72,8 @@ public class RunningMapFragmentPresenter extends MvpBasePresenter&lt;RunningMapFrag
72 /** 72 /**
73 * 轨迹点集合 73 * 轨迹点集合
74 */ 74 */
75 - private String imports = "[{\"latitude\":39.93395837223,\"latitudeE6\":3.993395837223E7,\"longitude\":116.30855458458,\"longitudeE6\":1.1630855458457999E8},{\"latitude\":39.93396326228,\"latitudeE6\":3.993396326228E7,\"longitude\":116.30861833018,\"longitudeE6\":1.1630861833017999E8},{\"latitude\":39.934156956749995,\"latitudeE6\":3.993415695675E7,\"longitude\":116.30869672329999,\"longitudeE6\":1.163086967233E8},{\"latitude\":39.934220163784,\"latitudeE6\":3.9934220163784E7,\"longitude\":116.3087100148,\"longitudeE6\":1.163087100148E8},{\"latitude\":39.934285263072,\"latitudeE6\":3.9934285263072E7,\"longitude\":116.30866498582,\"longitudeE6\":1.1630866498582E8},{\"latitude\":39.934351994321,\"latitudeE6\":3.9934351994320996E7,\"longitude\":116.30865820422,\"longitudeE6\":1.1630865820422E8},{\"latitude\":39.934393506188,\"latitudeE6\":3.9934393506188005E7,\"longitude\":116.3087268324,\"longitudeE6\":1.163087268324E8},{\"latitude\":39.934515310648,\"latitudeE6\":3.9934515310648E7,\"longitude\":116.30877023341,\"longitudeE6\":1.1630877023341E8},{\"latitude\":39.934576888398,\"latitudeE6\":3.9934576888398E7,\"longitude\":116.30876860572,\"longitudeE6\":1.1630876860572E8},{\"latitude\":39.934641987882,\"latitudeE6\":3.9934641987882E7,\"longitude\":116.30872520428,\"longitudeE6\":1.1630872520427999E8},{\"latitude\":39.934720386354,\"latitudeE6\":3.9934720386354E7,\"longitude\":116.30874175083,\"longitudeE6\":1.1630874175083E8},{\"latitude\":39.934703845843,\"latitudeE6\":3.9934703845843E7,\"longitude\":116.30880197017,\"longitudeE6\":1.1630880197016999E8},{\"latitude\":39.934719055573,\"latitudeE6\":3.9934719055573E7,\"longitude\":116.30896553874,\"longitudeE6\":1.1630896553874E8},{\"latitude\":39.93482461107,\"latitudeE6\":3.993482461107E7,\"longitude\":116.30924466304002,\"longitudeE6\":1.1630924466304001E8},{\"latitude\":39.934804821527,\"latitudeE6\":3.9934804821527004E7,\"longitude\":116.30935804892,\"longitudeE6\":1.1630935804892E8},{\"latitude\":39.934856643274,\"latitudeE6\":3.9934856643274E7,\"longitude\":116.30943996874,\"longitudeE6\":1.1630943996874E8},{\"latitude\":39.934844987999,\"latitudeE6\":3.9934844987999E7,\"longitude\":116.30952026112,\"longitudeE6\":1.1630952026112E8},{\"latitude\":39.934722121282,\"latitudeE6\":3.9934722121282004E7,\"longitude\":116.30967542086,\"longitudeE6\":1.1630967542086E8},{\"latitude\":39.934828721701,\"latitudeE6\":3.9934828721701E7,\"longitude\":116.30960516489,\"longitudeE6\":1.1630960516489E8},{\"latitude\":39.934408798988,\"latitudeE6\":3.9934408798988E7,\"longitude\":116.30961357453,\"longitudeE6\":1.1630961357453E8},{\"latitude\":39.934345321571,\"latitudeE6\":3.9934345321571E7,\"longitude\":116.30960842073,\"longitudeE6\":1.1630960842073E8},{\"latitude\":39.93436159016,\"latitudeE6\":3.9934361590160005E7,\"longitude\":116.30954331882,\"longitudeE6\":1.1630954331882E8},{\"latitude\":39.934295133241,\"latitudeE6\":3.9934295133241E7,\"longitude\":116.30957668364,\"longitudeE6\":1.1630957668364E8},{\"latitude\":39.934188525341,\"latitudeE6\":3.9934188525341E7,\"longitude\":116.30958183769,\"longitudeE6\":1.1630958183769001E8},{\"latitude\":39.933976660469,\"latitudeE6\":3.9933976660469E7,\"longitude\":116.30954494693,\"longitudeE6\":1.1630954494693E8},{\"latitude\":39.933993190121,\"latitudeE6\":3.9933993190121E7,\"longitude\":116.30939114375,\"longitudeE6\":1.1630939114375001E8},{\"latitude\":39.933938115564,\"latitudeE6\":3.9933938115563996E7,\"longitude\":116.30932956832,\"longitudeE6\":1.1630932956831999E8},{\"latitude\":39.933916130555,\"latitudeE6\":3.9933916130555E7,\"longitude\":116.30922269279,\"longitudeE6\":1.1630922269279E8},{\"latitude\":39.933836097011,\"latitudeE6\":3.9933836097011E7,\"longitude\":116.30914077307,\"longitudeE6\":1.1630914077307E8}]\n";  
76 - private HashMap<Integer, Boolean> importHash; 75 +// private String imports = "[{\"latitude\":39.93395837223,\"latitudeE6\":3.993395837223E7,\"longitude\":116.30855458458,\"longitudeE6\":1.1630855458457999E8},{\"latitude\":39.93396326228,\"latitudeE6\":3.993396326228E7,\"longitude\":116.30861833018,\"longitudeE6\":1.1630861833017999E8},{\"latitude\":39.934156956749995,\"latitudeE6\":3.993415695675E7,\"longitude\":116.30869672329999,\"longitudeE6\":1.163086967233E8},{\"latitude\":39.934220163784,\"latitudeE6\":3.9934220163784E7,\"longitude\":116.3087100148,\"longitudeE6\":1.163087100148E8},{\"latitude\":39.934285263072,\"latitudeE6\":3.9934285263072E7,\"longitude\":116.30866498582,\"longitudeE6\":1.1630866498582E8},{\"latitude\":39.934351994321,\"latitudeE6\":3.9934351994320996E7,\"longitude\":116.30865820422,\"longitudeE6\":1.1630865820422E8},{\"latitude\":39.934393506188,\"latitudeE6\":3.9934393506188005E7,\"longitude\":116.3087268324,\"longitudeE6\":1.163087268324E8},{\"latitude\":39.934515310648,\"latitudeE6\":3.9934515310648E7,\"longitude\":116.30877023341,\"longitudeE6\":1.1630877023341E8},{\"latitude\":39.934576888398,\"latitudeE6\":3.9934576888398E7,\"longitude\":116.30876860572,\"longitudeE6\":1.1630876860572E8},{\"latitude\":39.934641987882,\"latitudeE6\":3.9934641987882E7,\"longitude\":116.30872520428,\"longitudeE6\":1.1630872520427999E8},{\"latitude\":39.934720386354,\"latitudeE6\":3.9934720386354E7,\"longitude\":116.30874175083,\"longitudeE6\":1.1630874175083E8},{\"latitude\":39.934703845843,\"latitudeE6\":3.9934703845843E7,\"longitude\":116.30880197017,\"longitudeE6\":1.1630880197016999E8},{\"latitude\":39.934719055573,\"latitudeE6\":3.9934719055573E7,\"longitude\":116.30896553874,\"longitudeE6\":1.1630896553874E8},{\"latitude\":39.93482461107,\"latitudeE6\":3.993482461107E7,\"longitude\":116.30924466304002,\"longitudeE6\":1.1630924466304001E8},{\"latitude\":39.934804821527,\"latitudeE6\":3.9934804821527004E7,\"longitude\":116.30935804892,\"longitudeE6\":1.1630935804892E8},{\"latitude\":39.934856643274,\"latitudeE6\":3.9934856643274E7,\"longitude\":116.30943996874,\"longitudeE6\":1.1630943996874E8},{\"latitude\":39.934844987999,\"latitudeE6\":3.9934844987999E7,\"longitude\":116.30952026112,\"longitudeE6\":1.1630952026112E8},{\"latitude\":39.934722121282,\"latitudeE6\":3.9934722121282004E7,\"longitude\":116.30967542086,\"longitudeE6\":1.1630967542086E8},{\"latitude\":39.934828721701,\"latitudeE6\":3.9934828721701E7,\"longitude\":116.30960516489,\"longitudeE6\":1.1630960516489E8},{\"latitude\":39.934408798988,\"latitudeE6\":3.9934408798988E7,\"longitude\":116.30961357453,\"longitudeE6\":1.1630961357453E8},{\"latitude\":39.934345321571,\"latitudeE6\":3.9934345321571E7,\"longitude\":116.30960842073,\"longitudeE6\":1.1630960842073E8},{\"latitude\":39.93436159016,\"latitudeE6\":3.9934361590160005E7,\"longitude\":116.30954331882,\"longitudeE6\":1.1630954331882E8},{\"latitude\":39.934295133241,\"latitudeE6\":3.9934295133241E7,\"longitude\":116.30957668364,\"longitudeE6\":1.1630957668364E8},{\"latitude\":39.934188525341,\"latitudeE6\":3.9934188525341E7,\"longitude\":116.30958183769,\"longitudeE6\":1.1630958183769001E8},{\"latitude\":39.933976660469,\"latitudeE6\":3.9933976660469E7,\"longitude\":116.30954494693,\"longitudeE6\":1.1630954494693E8},{\"latitude\":39.933993190121,\"latitudeE6\":3.9933993190121E7,\"longitude\":116.30939114375,\"longitudeE6\":1.1630939114375001E8},{\"latitude\":39.933938115564,\"latitudeE6\":3.9933938115563996E7,\"longitude\":116.30932956832,\"longitudeE6\":1.1630932956831999E8},{\"latitude\":39.933916130555,\"latitudeE6\":3.9933916130555E7,\"longitude\":116.30922269279,\"longitudeE6\":1.1630922269279E8},{\"latitude\":39.933836097011,\"latitudeE6\":3.9933836097011E7,\"longitude\":116.30914077307,\"longitudeE6\":1.1630914077307E8}]\n";
  76 + private List<LatLng> importPoints;
77 77
78 /** 78 /**
79 * 查询运营人员踩得轨迹 79 * 查询运营人员踩得轨迹
@@ -319,7 +319,10 @@ public class RunningMapFragmentPresenter extends MvpBasePresenter&lt;RunningMapFrag @@ -319,7 +319,10 @@ public class RunningMapFragmentPresenter extends MvpBasePresenter&lt;RunningMapFrag
319 //获取当前的实体名称 319 //获取当前的实体名称
320 String entityName = CommonInfo.getUserId(context); 320 String entityName = CommonInfo.getUserId(context);
321 //打的重要点 321 //打的重要点
322 - List<LatLng> importPoints = GsonUtil.jsonToList(imports, LatLng.class); 322 + importPoints = null;
  323 + if (!TextUtils.isEmpty(userStepEntity.getImportPoint())) {
  324 + importPoints = GsonUtil.jsonToList(userStepEntity.getImportPoint(), LatLng.class);
  325 + }
323 MyMapUtil.queryHistoryTrace(context, StepService.mClient, entityName, startTime, endTime, new MyMapUtil.CallBack() { 326 MyMapUtil.queryHistoryTrace(context, StepService.mClient, entityName, startTime, endTime, new MyMapUtil.CallBack() {
324 @Override 327 @Override
325 public void success(List<LatLng> resultPoints) { 328 public void success(List<LatLng> resultPoints) {
@@ -371,7 +374,7 @@ public class RunningMapFragmentPresenter extends MvpBasePresenter&lt;RunningMapFrag @@ -371,7 +374,7 @@ public class RunningMapFragmentPresenter extends MvpBasePresenter&lt;RunningMapFrag
371 } 374 }
372 } 375 }
373 //开始划线 376 //开始划线
374 - MyMapUtil.drawHistoryTrack(context, getView().baiduMap, resultPoints, SortType.asc, R.color.red, 0, R.drawable.icon_end); 377 + MyMapUtil.drawHistoryTrack(context, getView().baiduMap, resultPoints, SortType.asc, R.color.red, 0, R.drawable.icon_end);
375 378
376 } 379 }
377 } 380 }
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/presenter/UploadFailDetailFragmentPresenter.java
@@ -16,6 +16,7 @@ import com.cnlive.libs.base.logic.callback.SuccessCallback; @@ -16,6 +16,7 @@ import com.cnlive.libs.base.logic.callback.SuccessCallback;
16 import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; 16 import com.cnlive.moudle.pedometer.commonInfo.CommonInfo;
17 import com.cnlive.moudle.pedometer.frame.view.UploadFailDetailFragmentView; 17 import com.cnlive.moudle.pedometer.frame.view.UploadFailDetailFragmentView;
18 import com.cnlive.moudle.pedometer.model.Constant; 18 import com.cnlive.moudle.pedometer.model.Constant;
  19 +import com.cnlive.moudle.pedometer.model.MessageEvent;
19 import com.cnlive.moudle.pedometer.model.RunningFinishBean; 20 import com.cnlive.moudle.pedometer.model.RunningFinishBean;
20 import com.cnlive.moudle.pedometer.net.ApiServiceRunLin; 21 import com.cnlive.moudle.pedometer.net.ApiServiceRunLin;
21 import com.cnlive.moudle.pedometer.net.SubscriptionRequest; 22 import com.cnlive.moudle.pedometer.net.SubscriptionRequest;
@@ -31,6 +32,8 @@ import com.cnlive.moudle.pedometer.utils.StepUtil; @@ -31,6 +32,8 @@ import com.cnlive.moudle.pedometer.utils.StepUtil;
31 import com.example.moudle_pedometer.R; 32 import com.example.moudle_pedometer.R;
32 import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter; 33 import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter;
33 34
  35 +import org.greenrobot.eventbus.EventBus;
  36 +
34 import java.util.HashMap; 37 import java.util.HashMap;
35 import java.util.List; 38 import java.util.List;
36 import java.util.Map; 39 import java.util.Map;
@@ -90,7 +93,7 @@ public class UploadFailDetailFragmentPresenter extends MvpBasePresenter&lt;UploadFa @@ -90,7 +93,7 @@ public class UploadFailDetailFragmentPresenter extends MvpBasePresenter&lt;UploadFa
90 if (!failedEntity.getIsPause()) { 93 if (!failedEntity.getIsPause()) {
91 MyMapUtil.drawHistoryTrack(context, getView().baiduMap, resultPoints, SortType.asc, R.color.red, R.drawable.icon_start, R.drawable.icon_end); 94 MyMapUtil.drawHistoryTrack(context, getView().baiduMap, resultPoints, SortType.asc, R.color.red, R.drawable.icon_start, R.drawable.icon_end);
92 //设置地图自动缩放 95 //设置地图自动缩放
93 - MyMapUtil.setMapAutoZoom(getView().baiduMap, resultPoints, -2f); 96 + MyMapUtil.setMapAutoZoom(getView().baiduMap, resultPoints, -0.8f);
94 } else { 97 } else {
95 MyMapUtil.drawHistoryTrack(context, getView().baiduMap, resultPoints, SortType.asc, R.color.red, R.drawable.icon_start, 0); 98 MyMapUtil.drawHistoryTrack(context, getView().baiduMap, resultPoints, SortType.asc, R.color.red, R.drawable.icon_start, 0);
96 99
@@ -144,7 +147,7 @@ public class UploadFailDetailFragmentPresenter extends MvpBasePresenter&lt;UploadFa @@ -144,7 +147,7 @@ public class UploadFailDetailFragmentPresenter extends MvpBasePresenter&lt;UploadFa
144 allResultPoints.addAll(resultPoints); 147 allResultPoints.addAll(resultPoints);
145 } 148 }
146 //设置地图自动缩放 149 //设置地图自动缩放
147 - MyMapUtil.setMapAutoZoom(getView().baiduMap, allResultPoints, -2f); 150 + MyMapUtil.setMapAutoZoom(getView().baiduMap, allResultPoints, -0.8f);
148 //判断用户是否完成 151 //判断用户是否完成
149 if (!failedEntity.getIsArriveEndPoint()) { 152 if (!failedEntity.getIsArriveEndPoint()) {
150 //没有完成 153 //没有完成
@@ -329,6 +332,8 @@ public class UploadFailDetailFragmentPresenter extends MvpBasePresenter&lt;UploadFa @@ -329,6 +332,8 @@ public class UploadFailDetailFragmentPresenter extends MvpBasePresenter&lt;UploadFa
329 if (getView() == null) { 332 if (getView() == null) {
330 return; 333 return;
331 } 334 }
  335 + //更新我的记录列表
  336 + EventBus.getDefault().post(new MessageEvent(Constant.UPDATE_MYSELF_RECORD_LIST, ""));
332 QMUITipDialogUtil.dismessDialog(); 337 QMUITipDialogUtil.dismessDialog();
333 QMUITipDialogUtil.successDialog(context, "上传成功", 1); 338 QMUITipDialogUtil.successDialog(context, "上传成功", 1);
334 //删除暂存数据 339 //删除暂存数据
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/ALLScoreDetailFragmentView.java
@@ -89,7 +89,7 @@ public class ALLScoreDetailFragmentView implements MvpView { @@ -89,7 +89,7 @@ public class ALLScoreDetailFragmentView implements MvpView {
89 }); 89 });
90 } 90 }
91 91
92 - public void initMap() { 92 + public void initMap(MapCallBack mapCallBack) {
93 this.mMapView = fragment.binding.mapView; 93 this.mMapView = fragment.binding.mapView;
94 if (baiduMap == null) { 94 if (baiduMap == null) {
95 baiduMap = mMapView.getMap(); 95 baiduMap = mMapView.getMap();
@@ -104,5 +104,17 @@ public class ALLScoreDetailFragmentView implements MvpView { @@ -104,5 +104,17 @@ public class ALLScoreDetailFragmentView implements MvpView {
104 mUiSettings.setEnlargeCenterWithDoubleClickEnable(true); 104 mUiSettings.setEnlargeCenterWithDoubleClickEnable(true);
105 //隐藏自带的指南针,改用自定义指南针 杨帅 105 //隐藏自带的指南针,改用自定义指南针 杨帅
106 mUiSettings.setCompassEnabled(false); 106 mUiSettings.setCompassEnabled(false);
  107 + baiduMap.setOnMapLoadedCallback(new BaiduMap.OnMapLoadedCallback() {
  108 + @Override
  109 + public void onMapLoaded() {
  110 + if (null != mapCallBack) {
  111 + mapCallBack.onMapLoadFinish();
  112 + }
  113 + }
  114 + });
  115 + }
  116 +
  117 + public interface MapCallBack {
  118 + void onMapLoadFinish();
107 } 119 }
108 } 120 }
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/LineUpAgainView.java
@@ -5,16 +5,21 @@ import android.view.View; @@ -5,16 +5,21 @@ import android.view.View;
5 5
6 import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; 6 import com.cnlive.moudle.pedometer.commonInfo.CommonInfo;
7 import com.cnlive.moudle.pedometer.frame.presenter.LineUpAgainPresenter; 7 import com.cnlive.moudle.pedometer.frame.presenter.LineUpAgainPresenter;
  8 +import com.cnlive.moudle.pedometer.model.Constant;
  9 +import com.cnlive.moudle.pedometer.model.MessageEvent;
8 import com.cnlive.moudle.pedometer.sql.entity.FailedEntity; 10 import com.cnlive.moudle.pedometer.sql.entity.FailedEntity;
9 import com.cnlive.moudle.pedometer.ui.activity.UploadFailDetailActivity; 11 import com.cnlive.moudle.pedometer.ui.activity.UploadFailDetailActivity;
10 import com.cnlive.moudle.pedometer.ui.adapter.LineUpAgainAdapter; 12 import com.cnlive.moudle.pedometer.ui.adapter.LineUpAgainAdapter;
11 import com.cnlive.moudle.pedometer.ui.fragment.LineUpAgainFragment; 13 import com.cnlive.moudle.pedometer.ui.fragment.LineUpAgainFragment;
  14 +import com.cnlive.moudle.pedometer.ui.widget.SelectDialog;
12 import com.cnlive.moudle.pedometer.utils.StepUtil; 15 import com.cnlive.moudle.pedometer.utils.StepUtil;
13 import com.example.moudle_pedometer.R; 16 import com.example.moudle_pedometer.R;
14 import com.hannesdorfmann.mosby3.mvp.MvpView; 17 import com.hannesdorfmann.mosby3.mvp.MvpView;
15 import com.scwang.smartrefresh.layout.footer.ClassicsFooter; 18 import com.scwang.smartrefresh.layout.footer.ClassicsFooter;
16 import com.scwang.smartrefresh.layout.header.ClassicsHeader; 19 import com.scwang.smartrefresh.layout.header.ClassicsHeader;
17 20
  21 +import org.greenrobot.eventbus.EventBus;
  22 +
18 import java.util.ArrayList; 23 import java.util.ArrayList;
19 import java.util.List; 24 import java.util.List;
20 25
@@ -51,6 +56,39 @@ public class LineUpAgainView implements MvpView { @@ -51,6 +56,39 @@ public class LineUpAgainView implements MvpView {
51 UploadFailDetailActivity.startActivity(fragment.getActivity(), bean); 56 UploadFailDetailActivity.startActivity(fragment.getActivity(), bean);
52 } 57 }
53 }); 58 });
  59 + //设置点击删除按钮点击事件
  60 + againAdapter.setOnDeleteClickListener(new LineUpAgainAdapter.OnDeleteClickListener() {
  61 + @Override
  62 + public void onDeleteClickListener(int position) {
  63 + SelectDialog selectDialog = new SelectDialog(fragment.getActivity(), "确认删除该条记录?", "取消", new SelectDialog.DialogInterface() {
  64 + @Override
  65 + public void onClick(SelectDialog dialog) {
  66 + dialog.dismiss();
  67 + }
  68 + }, "删除", new SelectDialog.DialogInterface() {
  69 + @Override
  70 + public void onClick(SelectDialog dialog) {
  71 + dialog.dismiss();
  72 + if (null != failedEntities && null != failedEntities.get(position) && null != againAdapter) {
  73 + StepUtil.deleteTempSaveFailData(fragment.getActivity(), failedEntities.get(position));
  74 + //先删除数据库,再更新列表
  75 + againAdapter.updateDeleteList(position);
  76 + }
  77 + if (null != againAdapter) {
  78 + if (againAdapter.getListSize() < 1) {
  79 + if (null == fragment.getActivity()) {
  80 + return;
  81 + }
  82 + fragment.binding.llNoFailTip.setVisibility(View.VISIBLE);
  83 + }
  84 + }
  85 + }
  86 + });
  87 + selectDialog.setCancelable(false);
  88 + selectDialog.setCanceledOnTouchOutside(false);
  89 + selectDialog.show();
  90 + }
  91 + });
54 //设置重新上传按钮点击事件 92 //设置重新上传按钮点击事件
55 againAdapter.setOnRestartUploadClickListener(new LineUpAgainAdapter.OnRestartUploadClickListener() { 93 againAdapter.setOnRestartUploadClickListener(new LineUpAgainAdapter.OnRestartUploadClickListener() {
56 @Override 94 @Override
@@ -61,6 +99,8 @@ public class LineUpAgainView implements MvpView { @@ -61,6 +99,8 @@ public class LineUpAgainView implements MvpView {
61 fragment.getPresenter().queryHistoryTraceNoMap(fragment.getActivity(), failedEntity, new LineUpAgainPresenter.onResultListener() { 99 fragment.getPresenter().queryHistoryTraceNoMap(fragment.getActivity(), failedEntity, new LineUpAgainPresenter.onResultListener() {
62 @Override 100 @Override
63 public void onSuccess() { 101 public void onSuccess() {
  102 + //更新我的记录列表
  103 + EventBus.getDefault().post(new MessageEvent(Constant.UPDATE_MYSELF_RECORD_LIST, ""));
64 //刷新列表 104 //刷新列表
65 List<FailedEntity> failedEntities = StepUtil.getFailListData(fragment.getActivity(), CommonInfo.getUserId(fragment.getActivity())); 105 List<FailedEntity> failedEntities = StepUtil.getFailListData(fragment.getActivity(), CommonInfo.getUserId(fragment.getActivity()));
66 if (failedEntities == null || failedEntities.size() < 1) { 106 if (failedEntities == null || failedEntities.size() < 1) {
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/OnGoingFragmentView.java
@@ -23,6 +23,7 @@ import com.baidu.mapapi.search.route.RoutePlanSearch; @@ -23,6 +23,7 @@ import com.baidu.mapapi.search.route.RoutePlanSearch;
23 import com.baidu.mapapi.utils.DistanceUtil; 23 import com.baidu.mapapi.utils.DistanceUtil;
24 import com.baidu.trace.LBSTraceClient; 24 import com.baidu.trace.LBSTraceClient;
25 import com.baidu.trace.model.SortType; 25 import com.baidu.trace.model.SortType;
  26 +import com.cnlive.libs.base.application.AppConfig;
26 import com.cnlive.libs.base.util.StatusBarUtil2; 27 import com.cnlive.libs.base.util.StatusBarUtil2;
27 import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; 28 import com.cnlive.moudle.pedometer.commonInfo.CommonInfo;
28 import com.cnlive.moudle.pedometer.model.Constant; 29 import com.cnlive.moudle.pedometer.model.Constant;
@@ -363,9 +364,10 @@ public class OnGoingFragmentView implements MvpView { @@ -363,9 +364,10 @@ public class OnGoingFragmentView implements MvpView {
363 fragment.binding.includeRank.tvCatAllRank.setOnClickListener(new View.OnClickListener() { 364 fragment.binding.includeRank.tvCatAllRank.setOnClickListener(new View.OnClickListener() {
364 @Override 365 @Override
365 public void onClick(View view) { 366 public void onClick(View view) {
  367 + String baseWebUrl = AppConfig.isDebug() ? "http://wjjh5test.cnlive.com/cnSportListOver.html" : "http://wjjh5.cnlive.com/cnSportListOver.html";
366 ARouter.getInstance().build("/web/WebViewColorActivity") 368 ARouter.getInstance().build("/web/WebViewColorActivity")
367 - .withString("url", "http://wjjh5test.cnlive.com/cnSportList.html" + "?sid=" + CommonInfo.getUserId(fragment.getActivity()) + "&eventId=" + CommonInfo.getStreetId(fragment.getActivity()))  
368 - .withString("title", "排行榜") 369 + .withString("url", baseWebUrl + "?sid=" + CommonInfo.getUserId(fragment.getActivity()) + "&eventId=" + fragment.eventId)
  370 + .withString("title", "总排行榜")
369 .navigation(fragment.getActivity()); 371 .navigation(fragment.getActivity());
370 } 372 }
371 }); 373 });
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunMainFragmentView.java
1 package com.cnlive.moudle.pedometer.frame.view; 1 package com.cnlive.moudle.pedometer.frame.view;
2 2
3 import android.app.Activity; 3 import android.app.Activity;
  4 +import android.app.Service;
4 import android.content.Context; 5 import android.content.Context;
5 import android.content.Intent; 6 import android.content.Intent;
6 import android.os.Handler; 7 import android.os.Handler;
7 import android.os.SystemClock; 8 import android.os.SystemClock;
  9 +import android.os.Vibrator;
8 import android.support.v4.content.ContextCompat; 10 import android.support.v4.content.ContextCompat;
9 import android.text.TextUtils; 11 import android.text.TextUtils;
10 import android.util.Log; 12 import android.util.Log;
@@ -39,6 +41,7 @@ import com.cnlive.moudle.pedometer.ui.fragment.RunMainFragment; @@ -39,6 +41,7 @@ import com.cnlive.moudle.pedometer.ui.fragment.RunMainFragment;
39 import com.cnlive.moudle.pedometer.ui.widget.SelectDialog; 41 import com.cnlive.moudle.pedometer.ui.widget.SelectDialog;
40 import com.cnlive.moudle.pedometer.ui.widget.TipDialog; 42 import com.cnlive.moudle.pedometer.ui.widget.TipDialog;
41 import com.cnlive.moudle.pedometer.utils.ButtonAnimUtil; 43 import com.cnlive.moudle.pedometer.utils.ButtonAnimUtil;
  44 +import com.cnlive.moudle.pedometer.utils.ChineseToSpeechUtil;
42 import com.cnlive.moudle.pedometer.utils.GsonUtil; 45 import com.cnlive.moudle.pedometer.utils.GsonUtil;
43 import com.cnlive.moudle.pedometer.utils.MyMapUtil; 46 import com.cnlive.moudle.pedometer.utils.MyMapUtil;
44 import com.cnlive.moudle.pedometer.utils.MySpHelper; 47 import com.cnlive.moudle.pedometer.utils.MySpHelper;
@@ -72,6 +75,9 @@ public class RunMainFragmentView implements MvpView { @@ -72,6 +75,9 @@ public class RunMainFragmentView implements MvpView {
72 private String employTime = ""; 75 private String employTime = "";
73 private LatLng endLatLng;//终点坐标 76 private LatLng endLatLng;//终点坐标
74 private TipDialog tipDialog; 77 private TipDialog tipDialog;
  78 + //创建震动服务对象
  79 + private Vibrator mVibrator;
  80 + private boolean isfirstEndTip = true;
75 81
76 public RunMainFragmentView(RunMainFragment fragment) { 82 public RunMainFragmentView(RunMainFragment fragment) {
77 this.fragment = fragment; 83 this.fragment = fragment;
@@ -125,31 +131,45 @@ public class RunMainFragmentView implements MvpView { @@ -125,31 +131,45 @@ public class RunMainFragmentView implements MvpView {
125 * 初始化相关视图 131 * 初始化相关视图
126 */ 132 */
127 public void initView(RunRaceDetailInfo runRaceDetailInfo) { 133 public void initView(RunRaceDetailInfo runRaceDetailInfo) {
  134 + //获取手机震动服务
  135 + mVibrator = (Vibrator) getContext().getSystemService(Service.VIBRATOR_SERVICE);
128 uid = CommonInfo.getUserId(getContext()); 136 uid = CommonInfo.getUserId(getContext());
129 userStepEntity = StepUtil.getUserStepData(getContext(), uid); 137 userStepEntity = StepUtil.getUserStepData(getContext(), uid);
130 //设置数据 138 //设置数据
131 if (userStepEntity != null) { 139 if (userStepEntity != null) {
132 //设置赛事标题 140 //设置赛事标题
133 - if (TextUtils.isEmpty(userStepEntity.getStreetTitle())) {  
134 - StepUtil.setStreetTitle(getContext(), CommonInfo.getUserId(getContext()), runRaceDetailInfo.getTitle()); 141 + if (TextUtils.isEmpty(userStepEntity.getStreetTitle()) || null == userStepEntity.getStreetTitle()) {
  142 + userStepEntity = StepUtil.getUserStepData(getContext(), uid);
  143 + if (null != userStepEntity) {
  144 + StepUtil.setStreetTitle(getContext(), CommonInfo.getUserId(getContext()), runRaceDetailInfo.getTitle());
  145 + }
135 } 146 }
136 //设置实体名字 147 //设置实体名字
137 - if (TextUtils.isEmpty(userStepEntity.getQueryEntityName())) { 148 + if (TextUtils.isEmpty(userStepEntity.getQueryEntityName()) || null == userStepEntity.getQueryEntityName()) {
138 long startTime = Long.parseLong(runRaceDetailInfo.getStartTime()); 149 long startTime = Long.parseLong(runRaceDetailInfo.getStartTime());
139 long endTime = Long.parseLong(runRaceDetailInfo.getEndTime()); 150 long endTime = Long.parseLong(runRaceDetailInfo.getEndTime());
140 - StepUtil.setQueryTraceTime(getContext(), CommonInfo.getUserId(getContext()), startTime, endTime, runRaceDetailInfo.getEntityName()); 151 + userStepEntity = StepUtil.getUserStepData(getContext(), uid);
  152 + if (null != userStepEntity) {
  153 + StepUtil.setQueryTraceTime(getContext(), CommonInfo.getUserId(getContext()), startTime, endTime, runRaceDetailInfo.getEntityName());
  154 + }
141 } 155 }
142 //设置开始时间和赛事id 156 //设置开始时间和赛事id
143 - if (TextUtils.isEmpty(userStepEntity.getStreetId())) {  
144 - StepUtil.setStepStartData(getContext(), uid, TimeUtil.getNowTimeStamp(), CommonInfo.getStreetId(getContext())); 157 + if (TextUtils.isEmpty(userStepEntity.getStreetId()) || null == userStepEntity.getStreetId()) {
  158 + userStepEntity = StepUtil.getUserStepData(getContext(), uid);
  159 + if (null != userStepEntity) {
  160 + StepUtil.setStepStartData(getContext(), uid, TimeUtil.getNowTimeStamp(), CommonInfo.getStreetId(getContext()));
  161 + }
145 } 162 }
146 //设置终点经纬度 163 //设置终点经纬度
147 - if (TextUtils.isEmpty(userStepEntity.getEndLatLng())) { 164 + if (TextUtils.isEmpty(userStepEntity.getEndLatLng()) || null == userStepEntity.getEndLatLng()) {
148 if (null != runRaceDetailInfo.getEndLatLng()) { 165 if (null != runRaceDetailInfo.getEndLatLng()) {
149 - //设置终点坐标  
150 - userStepEntity.setEndLatLng(runRaceDetailInfo.getEndLatLng());  
151 - //更新数据  
152 - StepUtil.updateStepData(getContext(), userStepEntity); 166 + userStepEntity = StepUtil.getUserStepData(getContext(), uid);
  167 + if (null != userStepEntity) {
  168 + //设置终点坐标
  169 + userStepEntity.setEndLatLng(runRaceDetailInfo.getEndLatLng());
  170 + //更新数据
  171 + StepUtil.updateStepData(getContext(), userStepEntity);
  172 + }
153 } 173 }
154 } 174 }
155 //设置终点经纬度 175 //设置终点经纬度
@@ -157,7 +177,7 @@ public class RunMainFragmentView implements MvpView { @@ -157,7 +177,7 @@ public class RunMainFragmentView implements MvpView {
157 endLatLng = GsonUtil.GsonToBean(userStepEntity.getEndLatLng(), LatLng.class); 177 endLatLng = GsonUtil.GsonToBean(userStepEntity.getEndLatLng(), LatLng.class);
158 } 178 }
159 //设置步数 179 //设置步数
160 - if (!TextUtils.isEmpty(userStepEntity.getStepCount())){ 180 + if (!TextUtils.isEmpty(userStepEntity.getStepCount())) {
161 //设置行走步数 181 //设置行走步数
162 fragment.binding.tvStepCount.setText(userStepEntity.getStepCount()); 182 fragment.binding.tvStepCount.setText(userStepEntity.getStepCount());
163 //设置行走公里 183 //设置行走公里
@@ -413,13 +433,17 @@ public class RunMainFragmentView implements MvpView { @@ -413,13 +433,17 @@ public class RunMainFragmentView implements MvpView {
413 runningFinishBean.setStreetTitle(userStepEntity.getStreetTitle()); 433 runningFinishBean.setStreetTitle(userStepEntity.getStreetTitle());
414 //设置用时 434 //设置用时
415 runningFinishBean.setEmployTime(employTime); 435 runningFinishBean.setEmployTime(employTime);
416 - 436 + //刷新一遍数据
  437 + userStepEntity = StepUtil.getUserStepData(getContext(), uid);
417 //先将失败数据保存起来 438 //先将失败数据保存起来
418 if (runningFinishBean != null && userStepEntity != null) { 439 if (runningFinishBean != null && userStepEntity != null) {
419 setFailData(getContext(), userStepEntity, runningFinishBean); 440 setFailData(getContext(), userStepEntity, runningFinishBean);
420 } 441 }
421 FailedEntity failedEntity = StepUtil.getTempSaveFailData(getContext(), CommonInfo.getUserId(getContext()), userStepEntity.getStartTimeStamp()); 442 FailedEntity failedEntity = StepUtil.getTempSaveFailData(getContext(), CommonInfo.getUserId(getContext()), userStepEntity.getStartTimeStamp());
422 if (failedEntity != null) { 443 if (failedEntity != null) {
  444 + if (null != failedEntity.getUuid()) {
  445 + runningFinishBean.setFailUUID(failedEntity.getUuid());
  446 + }
423 RunningFinishActivity.startActivity(fragment.getActivity(), runningFinishBean); 447 RunningFinishActivity.startActivity(fragment.getActivity(), runningFinishBean);
424 fragment.getActivity().finish(); 448 fragment.getActivity().finish();
425 } 449 }
@@ -539,6 +563,7 @@ public class RunMainFragmentView implements MvpView { @@ -539,6 +563,7 @@ public class RunMainFragmentView implements MvpView {
539 if (getContext() == null) { 563 if (getContext() == null) {
540 return; 564 return;
541 } 565 }
  566 +
542 fragment.getActivity().finish(); 567 fragment.getActivity().finish();
543 } 568 }
544 }); 569 });
@@ -770,8 +795,20 @@ public class RunMainFragmentView implements MvpView { @@ -770,8 +795,20 @@ public class RunMainFragmentView implements MvpView {
770 //更新数据 795 //更新数据
771 StepUtil.updateStepData(getContext(), userStepEntity); 796 StepUtil.updateStepData(getContext(), userStepEntity);
772 } 797 }
  798 + if (!isfirstEndTip) {
  799 + return;
  800 + }
  801 + if (isfirstEndTip) {
  802 + isfirstEndTip = false;
  803 + }
773 //进行提示 804 //进行提示
774 if (null == tipDialog) { 805 if (null == tipDialog) {
  806 + ChineseToSpeechUtil.speech(getContext(), "您已到达终点附近,可以结束运动了!");
  807 + if (mVibrator != null) {
  808 + //设置震动周期,数组表示时间:等待+执行,单位是毫秒,下面操作代表:等待100,执行100,等待100,执行1000,
  809 + //后面的数字如果为-1代表不重复,之执行一次,其他代表会重复,0代表从数组的第0个位置开始
  810 + mVibrator.vibrate(new long[]{Constant.VIBRATOR_DELAY_TIME, Constant.VIBRATOR_RUN_TIME, Constant.VIBRATOR_DELAY_TIME, Constant.VIBRATOR_RUN_TIME}, Constant.VIBRATOR_REPEAT_TIME);
  811 + }
775 tipDialog = new TipDialog(getContext(), getContext().getResources().getString(R.string.run_race_arrive_end_tip), "好的", R.color.green_round, new TipDialog.DialogInterface() { 812 tipDialog = new TipDialog(getContext(), getContext().getResources().getString(R.string.run_race_arrive_end_tip), "好的", R.color.green_round, new TipDialog.DialogInterface() {
776 @Override 813 @Override
777 public void onClick(TipDialog dialog) { 814 public void onClick(TipDialog dialog) {
@@ -800,6 +837,7 @@ public class RunMainFragmentView implements MvpView { @@ -800,6 +837,7 @@ public class RunMainFragmentView implements MvpView {
800 CommonInfo.setIsWriteUserStep(getContext(), false); 837 CommonInfo.setIsWriteUserStep(getContext(), false);
801 if (StepService.mClient != null) { 838 if (StepService.mClient != null) {
802 StepService.mClient.stopGather(StepService.traceListener); 839 StepService.mClient.stopGather(StepService.traceListener);
  840 +// StepService.CURRENT_STEP = 0;
803 } 841 }
804 fragment.getActivity().stopService(new Intent(fragment.getActivity(), StepService.class)); 842 fragment.getActivity().stopService(new Intent(fragment.getActivity(), StepService.class));
805 } 843 }
@@ -810,6 +848,11 @@ public class RunMainFragmentView implements MvpView { @@ -810,6 +848,11 @@ public class RunMainFragmentView implements MvpView {
810 } 848 }
811 } 849 }
812 850
  851 + public void onResume() {
  852 + //保持最新的步数
  853 + EventBus.getDefault().post(new MessageEvent(Constant.SERVICE_STEP_COUNT_ONRESUME, ""));
  854 + }
  855 +
813 /** 856 /**
814 * 暂存失败数据 857 * 暂存失败数据
815 * 858 *
@@ -885,6 +928,10 @@ public class RunMainFragmentView implements MvpView { @@ -885,6 +928,10 @@ public class RunMainFragmentView implements MvpView {
885 StepUtil.setFailData(context, failedEntity); 928 StepUtil.setFailData(context, failedEntity);
886 929
887 } 930 }
  931 +
  932 + public void onStop() {
  933 + ChineseToSpeechUtil.destroy();
  934 + }
888 } 935 }
889 936
890 937
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunRaceDetailFragmentView.java
@@ -111,6 +111,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { @@ -111,6 +111,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener {
111 private final float INIT_MAP_OVERLOOK = -40f;//地图倾斜角度 111 private final float INIT_MAP_OVERLOOK = -40f;//地图倾斜角度
112 private final float DEFAULT_MAP_AUTO_ZOOM = -0.8f;//根据点位,自动缩放的比例 112 private final float DEFAULT_MAP_AUTO_ZOOM = -0.8f;//根据点位,自动缩放的比例
113 private List<LatLng> queryResultPoints;//查询到的历史轨迹 113 private List<LatLng> queryResultPoints;//查询到的历史轨迹
  114 + private List<String> joinFaceIcon;//参与活动人数
114 115
115 public RunRaceDetailFragmentView(RunRaceDetailFragment fragment) { 116 public RunRaceDetailFragmentView(RunRaceDetailFragment fragment) {
116 this.fragment = fragment; 117 this.fragment = fragment;
@@ -183,15 +184,15 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { @@ -183,15 +184,15 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener {
183 StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.run_main_bg), 0); 184 StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.run_main_bg), 0);
184 185
185 } 186 }
186 - } else { 187 + } else if (slideOffset!=0){
187 if (fragment.binding.flTop.getVisibility() == View.VISIBLE) { 188 if (fragment.binding.flTop.getVisibility() == View.VISIBLE) {
188 QMUIStatusBarHelper.setStatusBarLightMode(fragment.getActivity()); 189 QMUIStatusBarHelper.setStatusBarLightMode(fragment.getActivity());
189 StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.white), 0); 190 StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.white), 0);
190 - fragment.binding.flTop.setVisibility(View.GONE); 191 + fragment.binding.flTop.setVisibility(View.INVISIBLE);
191 } 192 }
192 } 193 }
193 //设置卡片缩放特效 194 //设置卡片缩放特效
194 - if (slideOffset >= 0 && slideOffset <= 1) { 195 + if (slideOffset >= 0 && slideOffset <= 0.6) {
195 int leakWidth = (int) (ScreenUtil.dip2px(getContext(), 15) / 0.6); 196 int leakWidth = (int) (ScreenUtil.dip2px(getContext(), 15) / 0.6);
196 LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT); 197 LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
197 int current = (int) (leakWidth * slideOffset); 198 int current = (int) (leakWidth * slideOffset);
@@ -245,14 +246,14 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { @@ -245,14 +246,14 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener {
245 } else if (previousState == SlidingUpPanelLayout.PanelState.EXPANDED && newState == SlidingUpPanelLayout.PanelState.DRAGGING) { 246 } else if (previousState == SlidingUpPanelLayout.PanelState.EXPANDED && newState == SlidingUpPanelLayout.PanelState.DRAGGING) {
246 QMUIStatusBarHelper.setStatusBarLightMode(fragment.getActivity()); 247 QMUIStatusBarHelper.setStatusBarLightMode(fragment.getActivity());
247 StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.white), 0); 248 StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.white), 0);
248 - if (fragment.binding.flTop.getVisibility() != View.GONE) {  
249 - fragment.binding.flTop.setVisibility(View.GONE); 249 + if (fragment.binding.flTop.getVisibility() != View.INVISIBLE) {
  250 + fragment.binding.flTop.setVisibility(View.INVISIBLE);
250 } 251 }
251 } else if (previousState == SlidingUpPanelLayout.PanelState.DRAGGING && newState == SlidingUpPanelLayout.PanelState.ANCHORED) { 252 } else if (previousState == SlidingUpPanelLayout.PanelState.DRAGGING && newState == SlidingUpPanelLayout.PanelState.ANCHORED) {
252 QMUIStatusBarHelper.setStatusBarLightMode(fragment.getActivity()); 253 QMUIStatusBarHelper.setStatusBarLightMode(fragment.getActivity());
253 StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.white), 0); 254 StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.white), 0);
254 - if (fragment.binding.flTop.getVisibility() != View.GONE) {  
255 - fragment.binding.flTop.setVisibility(View.GONE); 255 + if (fragment.binding.flTop.getVisibility() != View.INVISIBLE) {
  256 + fragment.binding.flTop.setVisibility(View.INVISIBLE);
256 } 257 }
257 } 258 }
258 //设置地图缩放 259 //设置地图缩放
@@ -376,7 +377,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { @@ -376,7 +377,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener {
376 //设置参加人数 377 //设置参加人数
377 fragment.binding.includeStreet.tvSignPerson.setText(runRaceDetailInfo.getSignupNum() + ""); 378 fragment.binding.includeStreet.tvSignPerson.setText(runRaceDetailInfo.getSignupNum() + "");
378 //设置报名完成的头像 379 //设置报名完成的头像
379 - List<String> joinFaceIcon = runRaceDetailInfo.getFaceUrl(); 380 + joinFaceIcon = runRaceDetailInfo.getFaceUrl();
380 if (joinFaceIcon != null && joinFaceIcon.size() > 0) { 381 if (joinFaceIcon != null && joinFaceIcon.size() > 0) {
381 fragment.binding.includeStreet.fiveJoinPerson.setVisibility(View.VISIBLE); 382 fragment.binding.includeStreet.fiveJoinPerson.setVisibility(View.VISIBLE);
382 //设置头像数据 383 //设置头像数据
@@ -544,7 +545,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { @@ -544,7 +545,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener {
544 } 545 }
545 546
546 } else { 547 } else {
547 - QMUITipDialogUtil.textDialog(getContext(), "正在获取轨迹请稍后...", 1); 548 + QMUITipDialogUtil.textDialog(getContext(), "正在获取赛事,请稍后...", 1);
548 } 549 }
549 } 550 }
550 //继续运动 551 //继续运动
@@ -640,6 +641,10 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { @@ -640,6 +641,10 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener {
640 } 641 }
641 642
642 private void checkBaiduServiceState() { 643 private void checkBaiduServiceState() {
  644 + CommonInfo.setIsRunKeepAliveService(getContext(), true);
  645 + CommonInfo.setIsRunStepService(getContext(), true);
  646 + CommonInfo.setTsRunBaiduTraceService(getContext(), true);
  647 + CommonInfo.setIsWriteUserStep(getContext(), true);
643 boolean isRunBaidu = CommonInfo.getIsRunBaiduTraceService(getContext()); 648 boolean isRunBaidu = CommonInfo.getIsRunBaiduTraceService(getContext());
644 if (isRunBaidu) { 649 if (isRunBaidu) {
645 //判断百度服务是否运行 650 //判断百度服务是否运行
@@ -1010,7 +1015,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { @@ -1010,7 +1015,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener {
1010 //获取用户暂停的时间戳 1015 //获取用户暂停的时间戳
1011 long userPauseTime = userStepEntity.getChronometerBase(); 1016 long userPauseTime = userStepEntity.getChronometerBase();
1012 //判断时间是否小于9小时 1017 //判断时间是否小于9小时
1013 - Log.e(TAG, "checkStartBtnState: " + currnetTime + ",userPauseTime:" + userPauseTime); 1018 +// Log.e(TAG, "checkStartBtnState: " + currnetTime + ",userPauseTime:" + userPauseTime);
1014 if ((currnetTime - userPauseTime) <= (9 * 60 * 60 * 1000)) { 1019 if ((currnetTime - userPauseTime) <= (9 * 60 * 60 * 1000)) {
1015 Log.e(TAG, "小于9小时"); 1020 Log.e(TAG, "小于9小时");
1016 fragment.binding.tvRunNow.setText("继续运动"); 1021 fragment.binding.tvRunNow.setText("继续运动");
@@ -1258,6 +1263,49 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { @@ -1258,6 +1263,49 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener {
1258 if (getContext() == null) { 1263 if (getContext() == null) {
1259 return; 1264 return;
1260 } 1265 }
  1266 + //更新用户头像
  1267 + if (null != joinFaceIcon) {
  1268 + //获取用户头像
  1269 + if (TextUtils.isEmpty(CommonInfo.getUserIcon(getContext()))) {
  1270 + //添加默认头像
  1271 + joinFaceIcon.add(0, "http://wjj.ys1.cnliveimg.com/769/img/2018/0416/head_c.png");
  1272 + } else {
  1273 + //添加用户本身头像
  1274 + joinFaceIcon.add(0, CommonInfo.getUserIcon(getContext()));
  1275 +
  1276 + }
  1277 + }
  1278 + //没有一个用户头像
  1279 + else {
  1280 + joinFaceIcon = new ArrayList<>();
  1281 + //获取用户头像
  1282 + if (TextUtils.isEmpty(CommonInfo.getUserIcon(getContext()))) {
  1283 + //添加默认头像
  1284 + joinFaceIcon.add("http://wjj.ys1.cnliveimg.com/769/img/2018/0416/head_c.png");
  1285 + } else {
  1286 + //添加用户本身头像
  1287 + joinFaceIcon.add(CommonInfo.getUserIcon(getContext()));
  1288 +
  1289 + }
  1290 + }
  1291 +
  1292 + //开始更新头像
  1293 + if (null != joinFaceIcon) {
  1294 + fragment.binding.includeStreet.fiveJoinPerson.setVisibility(View.VISIBLE);
  1295 + //设置头像数据
  1296 + fragment.binding.includeStreet.fiveJoinPerson.initIconData(joinFaceIcon);
  1297 + }
  1298 + //更新参与人数
  1299 + if (!TextUtils.isEmpty(fragment.binding.includeStreet.tvSignPerson.getText().toString())) {
  1300 + if ("--".equals(fragment.binding.includeStreet.tvSignPerson.getText().toString())) {
  1301 + fragment.binding.includeStreet.tvSignPerson.setText("1");
  1302 + }
  1303 + if (null != runRaceDetailInfo) {
  1304 + fragment.binding.includeStreet.tvSignPerson.setText((runRaceDetailInfo.getSignupNum() + 1) + "");
  1305 + }
  1306 + } else {
  1307 + fragment.binding.includeStreet.tvSignPerson.setText("1");
  1308 + }
1261 fragment.binding.rlScrollViewStartBtn.setTag("1"); 1309 fragment.binding.rlScrollViewStartBtn.setTag("1");
1262 fragment.binding.tvRunNow.setText("现在开始"); 1310 fragment.binding.tvRunNow.setText("现在开始");
1263 fragment.binding.tvGoTip.setVisibility(View.VISIBLE); 1311 fragment.binding.tvGoTip.setVisibility(View.VISIBLE);
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunningFinishFragmentView.java
@@ -14,8 +14,10 @@ import com.baidu.trace.model.SortType; @@ -14,8 +14,10 @@ import com.baidu.trace.model.SortType;
14 import com.bumptech.glide.Glide; 14 import com.bumptech.glide.Glide;
15 import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; 15 import com.cnlive.moudle.pedometer.commonInfo.CommonInfo;
16 import com.cnlive.moudle.pedometer.model.RunningFinishBean; 16 import com.cnlive.moudle.pedometer.model.RunningFinishBean;
  17 +import com.cnlive.moudle.pedometer.sql.entity.UserStepEntity;
17 import com.cnlive.moudle.pedometer.ui.fragment.RunningFinishFragment; 18 import com.cnlive.moudle.pedometer.ui.fragment.RunningFinishFragment;
18 import com.cnlive.moudle.pedometer.ui.fragment.RunningMapFragment; 19 import com.cnlive.moudle.pedometer.ui.fragment.RunningMapFragment;
  20 +import com.cnlive.moudle.pedometer.ui.widget.SelectDialog;
19 import com.cnlive.moudle.pedometer.utils.MyMapUtil; 21 import com.cnlive.moudle.pedometer.utils.MyMapUtil;
20 import com.cnlive.moudle.pedometer.utils.QMUITipDialogUtil; 22 import com.cnlive.moudle.pedometer.utils.QMUITipDialogUtil;
21 import com.cnlive.moudle.pedometer.utils.StepUtil; 23 import com.cnlive.moudle.pedometer.utils.StepUtil;
@@ -32,6 +34,7 @@ public class RunningFinishFragmentView implements MvpView { @@ -32,6 +34,7 @@ public class RunningFinishFragmentView implements MvpView {
32 public BaiduMap baiduMap; 34 public BaiduMap baiduMap;
33 private MapView mMapView; 35 private MapView mMapView;
34 private UiSettings mUiSettings; 36 private UiSettings mUiSettings;
  37 +
35 public RunningFinishFragmentView(RunningFinishFragment fragment) { 38 public RunningFinishFragmentView(RunningFinishFragment fragment) {
36 this.fragment = fragment; 39 this.fragment = fragment;
37 } 40 }
@@ -80,7 +83,30 @@ public class RunningFinishFragmentView implements MvpView { @@ -80,7 +83,30 @@ public class RunningFinishFragmentView implements MvpView {
80 if (fragment.getActivity() == null) { 83 if (fragment.getActivity() == null) {
81 return; 84 return;
82 } 85 }
83 - fragment.getActivity().finish(); 86 + UserStepEntity userStepEntity = StepUtil.getUserStepData(getContext(), CommonInfo.getUserId(getContext()));
  87 + if (null != userStepEntity) {
  88 + SelectDialog selectDialog = new SelectDialog(getContext(), "上传数据失败,您可在重新上传页面查看失败数据,是否确认返回?", "取消", new SelectDialog.DialogInterface() {
  89 + @Override
  90 + public void onClick(SelectDialog dialog) {
  91 + dialog.dismiss();
  92 + }
  93 + }, "返回", new SelectDialog.DialogInterface() {
  94 + @Override
  95 + public void onClick(SelectDialog dialog) {
  96 + dialog.dismiss();
  97 + StepUtil.clearRunData(getContext(), CommonInfo.getUserId(getContext()));
  98 + CommonInfo.reset(getContext());
  99 + fragment.getActivity().finish();
  100 + }
  101 + });
  102 + selectDialog.setCanceledOnTouchOutside(false);
  103 + selectDialog.setCancelable(false);
  104 + if (!selectDialog.isShowing()) {
  105 + selectDialog.show();
  106 + }
  107 + } else {
  108 + fragment.getActivity().finish();
  109 + }
84 } 110 }
85 }); 111 });
86 //完成按钮 112 //完成按钮
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunningMapFragmentView.java
1 package com.cnlive.moudle.pedometer.frame.view; 1 package com.cnlive.moudle.pedometer.frame.view;
2 2
  3 +import android.app.Service;
3 import android.content.Context; 4 import android.content.Context;
4 import android.graphics.Bitmap; 5 import android.graphics.Bitmap;
5 import android.graphics.BitmapFactory; 6 import android.graphics.BitmapFactory;
@@ -9,6 +10,7 @@ import android.hardware.SensorEventListener; @@ -9,6 +10,7 @@ import android.hardware.SensorEventListener;
9 import android.hardware.SensorManager; 10 import android.hardware.SensorManager;
10 import android.os.Handler; 11 import android.os.Handler;
11 import android.os.SystemClock; 12 import android.os.SystemClock;
  13 +import android.os.Vibrator;
12 import android.text.TextUtils; 14 import android.text.TextUtils;
13 import android.util.Log; 15 import android.util.Log;
14 import android.view.MotionEvent; 16 import android.view.MotionEvent;
@@ -38,18 +40,23 @@ import com.baidu.mapapi.utils.DistanceUtil; @@ -38,18 +40,23 @@ import com.baidu.mapapi.utils.DistanceUtil;
38 import com.baidu.trace.model.SortType; 40 import com.baidu.trace.model.SortType;
39 import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; 41 import com.cnlive.moudle.pedometer.commonInfo.CommonInfo;
40 import com.cnlive.moudle.pedometer.model.Constant; 42 import com.cnlive.moudle.pedometer.model.Constant;
  43 +import com.cnlive.moudle.pedometer.model.MessageEvent;
41 import com.cnlive.moudle.pedometer.model.RunningMapBean; 44 import com.cnlive.moudle.pedometer.model.RunningMapBean;
  45 +import com.cnlive.moudle.pedometer.service.StepService;
42 import com.cnlive.moudle.pedometer.sql.entity.UserStepEntity; 46 import com.cnlive.moudle.pedometer.sql.entity.UserStepEntity;
43 import com.cnlive.moudle.pedometer.ui.fragment.RunningMapFragment; 47 import com.cnlive.moudle.pedometer.ui.fragment.RunningMapFragment;
44 import com.cnlive.moudle.pedometer.ui.widget.TipDialog; 48 import com.cnlive.moudle.pedometer.ui.widget.TipDialog;
45 import com.cnlive.moudle.pedometer.utils.BitmapUtil; 49 import com.cnlive.moudle.pedometer.utils.BitmapUtil;
46 import com.cnlive.moudle.pedometer.utils.ButtonAnimUtil; 50 import com.cnlive.moudle.pedometer.utils.ButtonAnimUtil;
  51 +import com.cnlive.moudle.pedometer.utils.ChineseToSpeechUtil;
47 import com.cnlive.moudle.pedometer.utils.GsonUtil; 52 import com.cnlive.moudle.pedometer.utils.GsonUtil;
48 import com.cnlive.moudle.pedometer.utils.MyMapUtil; 53 import com.cnlive.moudle.pedometer.utils.MyMapUtil;
49 import com.cnlive.moudle.pedometer.utils.StepUtil; 54 import com.cnlive.moudle.pedometer.utils.StepUtil;
50 import com.example.moudle_pedometer.R; 55 import com.example.moudle_pedometer.R;
51 import com.hannesdorfmann.mosby3.mvp.MvpView; 56 import com.hannesdorfmann.mosby3.mvp.MvpView;
52 57
  58 +import org.greenrobot.eventbus.EventBus;
  59 +
53 import java.util.ArrayList; 60 import java.util.ArrayList;
54 import java.util.HashMap; 61 import java.util.HashMap;
55 import java.util.List; 62 import java.util.List;
@@ -83,6 +90,9 @@ public class RunningMapFragmentView implements MvpView, SensorEventListener { @@ -83,6 +90,9 @@ public class RunningMapFragmentView implements MvpView, SensorEventListener {
83 private LatLng endLatLng;//终点坐标 90 private LatLng endLatLng;//终点坐标
84 private UserStepEntity userStepEntity; 91 private UserStepEntity userStepEntity;
85 private TipDialog tipDialog; 92 private TipDialog tipDialog;
  93 + //创建震动服务对象
  94 + private Vibrator mVibrator;
  95 + private boolean isfirstEndTip = true;//是否是第一次提示到达终点
86 96
87 public RunningMapFragmentView(RunningMapFragment fragment) { 97 public RunningMapFragmentView(RunningMapFragment fragment) {
88 this.fragment = fragment; 98 this.fragment = fragment;
@@ -96,6 +106,8 @@ public class RunningMapFragmentView implements MvpView, SensorEventListener { @@ -96,6 +106,8 @@ public class RunningMapFragmentView implements MvpView, SensorEventListener {
96 if (getContext() == null) { 106 if (getContext() == null) {
97 return; 107 return;
98 } 108 }
  109 + //获取手机震动服务
  110 + mVibrator = (Vibrator) getContext().getSystemService(Service.VIBRATOR_SERVICE);
99 userStepEntity = StepUtil.getUserStepData(getContext(), CommonInfo.getUserId(getContext())); 111 userStepEntity = StepUtil.getUserStepData(getContext(), CommonInfo.getUserId(getContext()));
100 currentPoints = new ArrayList<>(); 112 currentPoints = new ArrayList<>();
101 initMap(); 113 initMap();
@@ -341,8 +353,22 @@ public class RunningMapFragmentView implements MvpView, SensorEventListener { @@ -341,8 +353,22 @@ public class RunningMapFragmentView implements MvpView, SensorEventListener {
341 //更新数据 353 //更新数据
342 StepUtil.updateStepData(getContext(), userStepEntity); 354 StepUtil.updateStepData(getContext(), userStepEntity);
343 } 355 }
  356 +
  357 + if (!isfirstEndTip) {
  358 + return;
  359 + }
  360 + if (isfirstEndTip) {
  361 + isfirstEndTip = false;
  362 + }
344 //进行提示 363 //进行提示
345 if (null == tipDialog) { 364 if (null == tipDialog) {
  365 + ChineseToSpeechUtil.speech(getContext(), "您已到达终点附近,可以结束运动了!");
  366 + if (mVibrator != null) {
  367 + //设置震动周期,数组表示时间:等待+执行,单位是毫秒,下面操作代表:等待100,执行100,等待100,执行1000,
  368 + //后面的数字如果为-1代表不重复,之执行一次,其他代表会重复,0代表从数组的第0个位置开始
  369 + mVibrator.vibrate(new long[]{Constant.VIBRATOR_DELAY_TIME, Constant.VIBRATOR_RUN_TIME, Constant.VIBRATOR_DELAY_TIME, Constant.VIBRATOR_RUN_TIME}, Constant.VIBRATOR_REPEAT_TIME);
  370 + }
  371 +
346 tipDialog = new TipDialog(getContext(), getContext().getResources().getString(R.string.run_race_arrive_end_tip), "好的", R.color.green_round, new TipDialog.DialogInterface() { 372 tipDialog = new TipDialog(getContext(), getContext().getResources().getString(R.string.run_race_arrive_end_tip), "好的", R.color.green_round, new TipDialog.DialogInterface() {
347 @Override 373 @Override
348 public void onClick(TipDialog dialog) { 374 public void onClick(TipDialog dialog) {
@@ -492,6 +518,10 @@ public class RunningMapFragmentView implements MvpView, SensorEventListener { @@ -492,6 +518,10 @@ public class RunningMapFragmentView implements MvpView, SensorEventListener {
492 518
493 } 519 }
494 520
  521 + public void onStop() {
  522 + ChineseToSpeechUtil.destroy();
  523 + }
  524 +
495 /** 525 /**
496 * 设置从历史轨迹中查询到的最新点 526 * 设置从历史轨迹中查询到的最新点
497 * 527 *
@@ -512,6 +542,7 @@ public class RunningMapFragmentView implements MvpView, SensorEventListener { @@ -512,6 +542,7 @@ public class RunningMapFragmentView implements MvpView, SensorEventListener {
512 if (mMapView != null) { 542 if (mMapView != null) {
513 mMapView.onResume(); 543 mMapView.onResume();
514 } 544 }
  545 + EventBus.getDefault().post(new MessageEvent(Constant.SERVICE_STEP_COUNT_ONRESUME, ""));
515 } 546 }
516 547
517 public void onPause() { 548 public void onPause() {
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/model/Constant.java
1 package com.cnlive.moudle.pedometer.model; 1 package com.cnlive.moudle.pedometer.model;
2 2
3 public class Constant { 3 public class Constant {
4 - public static final long SERVICE_ID = 213511;//公司账号  
5 -// public static final long SERVICE_ID = 213553;  
6 -  
7 - public static final int TAG = 1;  
8 - public static final int GATHER_INTERVAL = 2;//位置采集周期  
9 - public static final int PACK_INTERVAL = 10;//位置采集周期  
10 - 4 + /*********************************用户标志位**************************************************/
11 public static final int SERVICE_STEP_COUNT_UPDATE = 0;//步数更新 5 public static final int SERVICE_STEP_COUNT_UPDATE = 0;//步数更新
12 public static final int SERVICE_STEP_COUNT_PAUSE = 1;//步数暂停 6 public static final int SERVICE_STEP_COUNT_PAUSE = 1;//步数暂停
13 public static final int SERVICE_STEP_COUNT_CONTINUE = 2;//继续计步 7 public static final int SERVICE_STEP_COUNT_CONTINUE = 2;//继续计步
@@ -15,9 +9,8 @@ public class Constant { @@ -15,9 +9,8 @@ public class Constant {
15 public static final int FRAGMENT_RUN_CHRONOMETER = 4;//同步计时器 9 public static final int FRAGMENT_RUN_CHRONOMETER = 4;//同步计时器
16 public static final int EXIT_RANGE = 5;//超出范围 10 public static final int EXIT_RANGE = 5;//超出范围
17 public static final int ENTER_RANGE = 6;//进入范围 11 public static final int ENTER_RANGE = 6;//进入范围
18 -  
19 -  
20 - /*****************************************运营工具****************************************************/ 12 + public static final int UPDATE_MYSELF_RECORD_LIST = 16;//更新我的记录页面
  13 + /*****************************************运营工具标志位****************************************************/
21 public static final int COLL_SERVICE_STEP_COUNT_RESET_SPEED = 3;//重置速度 14 public static final int COLL_SERVICE_STEP_COUNT_RESET_SPEED = 3;//重置速度
22 public static final int COLL_SERVICE_STEP_COUNT_UPDATE = 0;//步数更新 15 public static final int COLL_SERVICE_STEP_COUNT_UPDATE = 0;//步数更新
23 public static final int COLL_START_TRACE_GATHER_SUCCESS = 7;//启动轨迹服务成功(运营) 16 public static final int COLL_START_TRACE_GATHER_SUCCESS = 7;//启动轨迹服务成功(运营)
@@ -27,11 +20,26 @@ public class Constant { @@ -27,11 +20,26 @@ public class Constant {
27 public static final int REGISTRATION_SUCCESS = 11;//用户报名成功 20 public static final int REGISTRATION_SUCCESS = 11;//用户报名成功
28 public static final int UPDATA_COLL_BIND_TRACE_LIST = 12;//更新已绑定列表 21 public static final int UPDATA_COLL_BIND_TRACE_LIST = 12;//更新已绑定列表
29 public static final int DELECT_COLL_BIND_TRACE_LIST = 13;//删除已绑定列表 22 public static final int DELECT_COLL_BIND_TRACE_LIST = 13;//删除已绑定列表
  23 + public static final int SERVICE_STEP_COUNT_ONRESUME = 14;//用户从后台回到前台,更新步数
  24 + public static final int COLL_SERVICE_STEP_COUNT_ONRESUME = 15;//运营从后台回到前台,更新步数
  25 +
  26 +
  27 + /*************************************用户其他值,非标志位************************************************************/
  28 + public static long SERVICE_ID = 0;//公司账号
  29 + // public static final long SERVICE_ID = 213553;
  30 + public static final int TAG = 1;
  31 + public static final int GATHER_INTERVAL = 2;//位置采集周期
  32 + public static final int PACK_INTERVAL = 10;//位置采集周期
  33 + public static final int VIBRATOR_DELAY_TIME = 100;//震动等待时间(ms)
  34 + public static final int VIBRATOR_RUN_TIME = 1000;//震动执行时间(ms)
  35 + public static final int VIBRATOR_REPEAT_TIME = -1;//震动重复次数(-1代表不重复,之执行一次,其他代表会重复,0代表从数组的第0个位置开始)
  36 + /*****************************************运营工具其他值,非标志位****************************************************/
30 public static final double PASS_RATE = 0.7;//通过率70% 37 public static final double PASS_RATE = 0.7;//通过率70%
31 public static final int CHECK_ACCURACY = 50;//判断用户是否完成的精度范围 38 public static final int CHECK_ACCURACY = 50;//判断用户是否完成的精度范围
32 public static final int LOCA_ACCURACY = 20;//定位过滤精度 39 public static final int LOCA_ACCURACY = 20;//定位过滤精度
33 public static final int LOCA_END_POINT_ACCURACY = 20;//终点位置比较精度 40 public static final int LOCA_END_POINT_ACCURACY = 20;//终点位置比较精度
34 public static final int LOCA_START_POINT_ACCURACY = 20;//起点位置比较精度 41 public static final int LOCA_START_POINT_ACCURACY = 20;//起点位置比较精度
35 - public static final int FENCE_OFFSET = 70;//围栏偏离距离  
36 - public static final int FENCE_DENOISE = 70;//围栏去噪精度 42 + public static final int FENCE_OFFSET = 50;//围栏偏离距离
  43 + public static final int FENCE_DENOISE = 20;//围栏去噪精度
  44 + public static final int TAKE_POINT_MAX_SIZE = 100;//最大打点数量
37 } 45 }
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/model/RunningFinishBean.java
@@ -27,6 +27,15 @@ public class RunningFinishBean implements Serializable { @@ -27,6 +27,15 @@ public class RunningFinishBean implements Serializable {
27 private boolean isPause; 27 private boolean isPause;
28 private String userPauseTime; 28 private String userPauseTime;
29 private String userContinueTime; 29 private String userContinueTime;
  30 + private String failUUID;
  31 +
  32 + public String getFailUUID() {
  33 + return failUUID;
  34 + }
  35 +
  36 + public void setFailUUID(String failUUID) {
  37 + this.failUUID = failUUID;
  38 + }
30 39
31 public boolean isPause() { 40 public boolean isPause() {
32 return isPause; 41 return isPause;
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/receivers/ServiceReceiver.java
@@ -21,7 +21,7 @@ import com.cnlive.moudle.pedometer.utils.ServiceUtils; @@ -21,7 +21,7 @@ import com.cnlive.moudle.pedometer.utils.ServiceUtils;
21 public class ServiceReceiver extends BroadcastReceiver { 21 public class ServiceReceiver extends BroadcastReceiver {
22 //唤醒锁 22 //唤醒锁
23 private PowerManager.WakeLock wakeLock = null; 23 private PowerManager.WakeLock wakeLock = null;
24 - private final String TAG = "CollServiceReceiver"; 24 + private final String TAG = "ServiceReceiver";
25 25
26 public ServiceReceiver() { 26 public ServiceReceiver() {
27 27
@@ -39,7 +39,7 @@ public class ServiceReceiver extends BroadcastReceiver { @@ -39,7 +39,7 @@ public class ServiceReceiver extends BroadcastReceiver {
39 //todo 这里判断要保活的服务 39 //todo 这里判断要保活的服务
40 boolean isRunStepService = CommonInfo.getIsRunStepService(context); 40 boolean isRunStepService = CommonInfo.getIsRunStepService(context);
41 if (isRunStepService) { 41 if (isRunStepService) {
42 - if (!ServiceUtils.isServiceRunning(context, "com.cnlive.moudle.pedometer.service.CollStepService")) { 42 + if (!ServiceUtils.isServiceRunning(context, "com.cnlive.moudle.pedometer.service.StepService")) {
43 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { 43 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
44 context.startForegroundService(new Intent(context, StepService.class)); 44 context.startForegroundService(new Intent(context, StepService.class));
45 } else { 45 } else {
@@ -65,7 +65,7 @@ public class ServiceReceiver extends BroadcastReceiver { @@ -65,7 +65,7 @@ public class ServiceReceiver extends BroadcastReceiver {
65 //todo 保活 65 //todo 保活
66 boolean isRunKeepAliveService = CommonInfo.getIsRunKeepAliveService(context); 66 boolean isRunKeepAliveService = CommonInfo.getIsRunKeepAliveService(context);
67 if (isRunKeepAliveService) { 67 if (isRunKeepAliveService) {
68 - if (!ServiceUtils.isServiceRunning(context, "com.cnlive.moudle.pedometer.service.CollKeepLiveService")) { 68 + if (!ServiceUtils.isServiceRunning(context, "com.cnlive.moudle.pedometer.service.KeepLiveService")) {
69 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { 69 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
70 context.startForegroundService(new Intent(context, KeepLiveService.class)); 70 context.startForegroundService(new Intent(context, KeepLiveService.class));
71 } else { 71 } else {
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/service/KeepLiveService.java
@@ -49,6 +49,7 @@ public class KeepLiveService extends Service implements MediaPlayer.OnCompletion @@ -49,6 +49,7 @@ public class KeepLiveService extends Service implements MediaPlayer.OnCompletion
49 private final String TAG = "KeepLiveService"; 49 private final String TAG = "KeepLiveService";
50 private Handler handler; 50 private Handler handler;
51 private Runnable runnable; 51 private Runnable runnable;
  52 + private boolean isRegisterReceiver = false;
52 53
53 public KeepLiveService() { 54 public KeepLiveService() {
54 } 55 }
@@ -106,13 +107,16 @@ public class KeepLiveService extends Service implements MediaPlayer.OnCompletion @@ -106,13 +107,16 @@ public class KeepLiveService extends Service implements MediaPlayer.OnCompletion
106 IntentFilter intentFilter = new IntentFilter(); 107 IntentFilter intentFilter = new IntentFilter();
107 intentFilter.addAction(Intent.ACTION_SCREEN_OFF); 108 intentFilter.addAction(Intent.ACTION_SCREEN_OFF);
108 intentFilter.addAction(Intent.ACTION_SCREEN_ON); 109 intentFilter.addAction(Intent.ACTION_SCREEN_ON);
109 -// intentFilter.addAction(Intent.ACTION_BATTERY_CHANGED); 110 + intentFilter.addAction(Intent.ACTION_TIME_CHANGED);
  111 + intentFilter.addAction(Intent.ACTION_TIME_TICK);
  112 + intentFilter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
110 // intentFilter.addAction(Intent.ACTION_TIME_CHANGED); 113 // intentFilter.addAction(Intent.ACTION_TIME_CHANGED);
111 // intentFilter.addAction(Intent.ACTION_POWER_CONNECTED); 114 // intentFilter.addAction(Intent.ACTION_POWER_CONNECTED);
112 // intentFilter.addAction(Intent.ACTION_POWER_DISCONNECTED); 115 // intentFilter.addAction(Intent.ACTION_POWER_DISCONNECTED);
113 intentFilter.addAction("com.cnlive.strike.receiver.ServiceReceiver"); 116 intentFilter.addAction("com.cnlive.strike.receiver.ServiceReceiver");
114 intentFilter.addAction("close.KeepService"); 117 intentFilter.addAction("close.KeepService");
115 registerReceiver(myReceiver, intentFilter); 118 registerReceiver(myReceiver, intentFilter);
  119 + isRegisterReceiver=true;
116 } 120 }
117 121
118 /** 122 /**
@@ -157,7 +161,7 @@ public class KeepLiveService extends Service implements MediaPlayer.OnCompletion @@ -157,7 +161,7 @@ public class KeepLiveService extends Service implements MediaPlayer.OnCompletion
157 } 161 }
158 showHideForegroundNotification(); 162 showHideForegroundNotification();
159 // startService(new Intent(getApplicationContext(), HideKeepTipService.class)); 163 // startService(new Intent(getApplicationContext(), HideKeepTipService.class));
160 - Log.e(TAG, "启动HideKeepTipService"); 164 +// Log.e(TAG, "启动HideKeepTipService");
161 startPlaySong(); 165 startPlaySong();
162 } 166 }
163 return START_STICKY; 167 return START_STICKY;
@@ -236,7 +240,7 @@ public class KeepLiveService extends Service implements MediaPlayer.OnCompletion @@ -236,7 +240,7 @@ public class KeepLiveService extends Service implements MediaPlayer.OnCompletion
236 public void onDestroy() { 240 public void onDestroy() {
237 super.onDestroy(); 241 super.onDestroy();
238 try { 242 try {
239 - if (myReceiver != null) { 243 + if (myReceiver != null&&isRegisterReceiver) {
240 unregisterReceiver(myReceiver); 244 unregisterReceiver(myReceiver);
241 } 245 }
242 } catch (Exception e) { 246 } catch (Exception e) {
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/service/StepService.java
@@ -112,7 +112,7 @@ public class StepService extends Service implements SensorEventListener { @@ -112,7 +112,7 @@ public class StepService extends Service implements SensorEventListener {
112 /** 112 /**
113 * 计步传感器类型 Sensor.TYPE_STEP_COUNTER或者Sensor.TYPE_STEP_DETECTOR 113 * 计步传感器类型 Sensor.TYPE_STEP_COUNTER或者Sensor.TYPE_STEP_DETECTOR
114 */ 114 */
115 - private static int stepSensorType = -1; 115 + private int stepSensorType = -1;
116 /** 116 /**
117 * 每次第一次启动记步服务时是否从系统中获取了已有的步数记录 117 * 每次第一次启动记步服务时是否从系统中获取了已有的步数记录
118 */ 118 */
@@ -247,7 +247,8 @@ public class StepService extends Service implements SensorEventListener { @@ -247,7 +247,8 @@ public class StepService extends Service implements SensorEventListener {
247 if (mClient != null) { 247 if (mClient != null) {
248 retryIndex = 0; 248 retryIndex = 0;
249 mClient.startGather(traceListener); 249 mClient.startGather(traceListener);
250 - Toast.makeText(getApplicationContext(), "开启轨迹服务", Toast.LENGTH_LONG).show(); 250 + Log.e(TAG, "开启轨迹服务");
  251 +// Toast.makeText(getApplicationContext(), "开启轨迹服务", Toast.LENGTH_LONG).show();
251 boolean isFirstSendNotification = CommonInfo.getIsFirstStepSendTraceTip(getApplicationContext()); 252 boolean isFirstSendNotification = CommonInfo.getIsFirstStepSendTraceTip(getApplicationContext());
252 if (isFirstSendNotification) { 253 if (isFirstSendNotification) {
253 CommonInfo.setIsFirstStepSendTraceTip(getApplicationContext(), false); 254 CommonInfo.setIsFirstStepSendTraceTip(getApplicationContext(), false);
@@ -292,7 +293,8 @@ public class StepService extends Service implements SensorEventListener { @@ -292,7 +293,8 @@ public class StepService extends Service implements SensorEventListener {
292 if (StatusCodes.SUCCESS == errorNo || StatusCodes.CACHE_TRACK_NOT_UPLOAD == errorNo) { 293 if (StatusCodes.SUCCESS == errorNo || StatusCodes.CACHE_TRACK_NOT_UPLOAD == errorNo) {
293 if (mClient != null) { 294 if (mClient != null) {
294 mClient.stopTrace(mTrace, traceListener); 295 mClient.stopTrace(mTrace, traceListener);
295 - Toast.makeText(getApplicationContext(), "停止轨迹服务", Toast.LENGTH_LONG).show(); 296 + Log.e(TAG, "停止轨迹服务");
  297 +// Toast.makeText(getApplicationContext(), "停止轨迹服务", Toast.LENGTH_LONG).show();
296 298
297 } 299 }
298 } 300 }
@@ -312,7 +314,8 @@ public class StepService extends Service implements SensorEventListener { @@ -312,7 +314,8 @@ public class StepService extends Service implements SensorEventListener {
312 public void onStartGatherCallback(int errorNo, String message) { 314 public void onStartGatherCallback(int errorNo, String message) {
313 if (StatusCodes.SUCCESS == errorNo || StatusCodes.GATHER_STARTED == errorNo) { 315 if (StatusCodes.SUCCESS == errorNo || StatusCodes.GATHER_STARTED == errorNo) {
314 retryIndex = 0; 316 retryIndex = 0;
315 - Toast.makeText(getApplicationContext(), "开始采集", Toast.LENGTH_LONG).show(); 317 + Log.e(TAG, "开始采集");
  318 +// Toast.makeText(getApplicationContext(), "开始采集", Toast.LENGTH_LONG).show();
316 } else { 319 } else {
317 //重新开启采集 320 //重新开启采集
318 if (retryIndex < 4) { 321 if (retryIndex < 4) {
@@ -337,7 +340,8 @@ public class StepService extends Service implements SensorEventListener { @@ -337,7 +340,8 @@ public class StepService extends Service implements SensorEventListener {
337 @Override 340 @Override
338 public void onStopGatherCallback(int errorNo, String message) { 341 public void onStopGatherCallback(int errorNo, String message) {
339 if (StatusCodes.SUCCESS == errorNo || StatusCodes.GATHER_STOPPED == errorNo) { 342 if (StatusCodes.SUCCESS == errorNo || StatusCodes.GATHER_STOPPED == errorNo) {
340 - Toast.makeText(getApplicationContext(), "停止采集", Toast.LENGTH_LONG).show(); 343 + Log.e(TAG, "停止采集");
  344 +// Toast.makeText(getApplicationContext(), "停止采集", Toast.LENGTH_LONG).show();
341 if (mClient != null) { 345 if (mClient != null) {
342 mClient.stopTrace(mTrace, traceListener); 346 mClient.stopTrace(mTrace, traceListener);
343 } 347 }
@@ -361,18 +365,18 @@ public class StepService extends Service implements SensorEventListener { @@ -361,18 +365,18 @@ public class StepService extends Service implements SensorEventListener {
361 public void onPushCallback(byte messageType, PushMessage pushMessage) { 365 public void onPushCallback(byte messageType, PushMessage pushMessage) {
362 Log.e(TAG, "onPushCallback: "); 366 Log.e(TAG, "onPushCallback: ");
363 367
364 - if (messageType < 0x03 || messageType > 0x04) {  
365 - return;  
366 - } 368 +// if (messageType < 0x03 || messageType > 0x04) {
  369 +// return;
  370 +// }
367 FenceAlarmPushInfo alarmPushInfo = pushMessage.getFenceAlarmPushInfo(); 371 FenceAlarmPushInfo alarmPushInfo = pushMessage.getFenceAlarmPushInfo();
368 if (null == alarmPushInfo) { 372 if (null == alarmPushInfo) {
369 return; 373 return;
370 } 374 }
371 UserStepEntity userStepEntity = StepUtil.getUserStepData(getApplicationContext(), CommonInfo.getUserId(getApplicationContext())); 375 UserStepEntity userStepEntity = StepUtil.getUserStepData(getApplicationContext(), CommonInfo.getUserId(getApplicationContext()));
372 - if (null == userStepEntity) { 376 + if (null == userStepEntity || TextUtils.isEmpty(userStepEntity.getFenceId())) {
373 return; 377 return;
374 } 378 }
375 - if (alarmPushInfo.getFenceId() == userStepEntity.getFenceId()) { 379 + if (alarmPushInfo.getFenceId() == Long.parseLong(userStepEntity.getFenceId())) {
376 //超出范围 380 //超出范围
377 if (alarmPushInfo.getMonitoredAction() == MonitoredAction.exit) { 381 if (alarmPushInfo.getMonitoredAction() == MonitoredAction.exit) {
378 EventBus.getDefault().post(new MessageEvent(Constant.EXIT_RANGE, "")); 382 EventBus.getDefault().post(new MessageEvent(Constant.EXIT_RANGE, ""));
@@ -381,7 +385,7 @@ public class StepService extends Service implements SensorEventListener { @@ -381,7 +385,7 @@ public class StepService extends Service implements SensorEventListener {
381 else if (alarmPushInfo.getMonitoredAction() == MonitoredAction.enter) { 385 else if (alarmPushInfo.getMonitoredAction() == MonitoredAction.enter) {
382 EventBus.getDefault().post(new MessageEvent(Constant.ENTER_RANGE, "")); 386 EventBus.getDefault().post(new MessageEvent(Constant.ENTER_RANGE, ""));
383 } 387 }
384 - Toast.makeText(getApplicationContext(), "onPushCallback:" + alarmPushInfo.getMonitoredAction(), Toast.LENGTH_SHORT).show(); 388 +// Toast.makeText(getApplicationContext(), "onPushCallback:" + alarmPushInfo.getMonitoredAction(), Toast.LENGTH_SHORT).show();
385 } 389 }
386 } 390 }
387 391
@@ -398,15 +402,18 @@ public class StepService extends Service implements SensorEventListener { @@ -398,15 +402,18 @@ public class StepService extends Service implements SensorEventListener {
398 } 402 }
399 403
400 public void startQueryFence() { 404 public void startQueryFence() {
401 - UserStepEntity userStepEntity = StepUtil.getUserStepData(getApplicationContext(), CommonInfo.getUserId(getApplicationContext())); 405 + final UserStepEntity userStepEntity = StepUtil.getUserStepData(getApplicationContext(), CommonInfo.getUserId(getApplicationContext()));
402 // 初始化围栏监听器 406 // 初始化围栏监听器
403 OnFenceListener onFenceListener = new OnFenceListener() { 407 OnFenceListener onFenceListener = new OnFenceListener() {
404 // 创建围栏回调 408 // 创建围栏回调
405 @Override 409 @Override
406 public void onCreateFenceCallback(CreateFenceResponse createFenceResponse) { 410 public void onCreateFenceCallback(CreateFenceResponse createFenceResponse) {
407 - if ("成功".equals(createFenceResponse.getMessage())) { 411 + if (null == createFenceResponse) {
  412 + return;
  413 + }
  414 + if (0 == createFenceResponse.getStatus()) {
408 // Toast.makeText(context, "创建围栏回调成功", Toast.LENGTH_SHORT).show(); 415 // Toast.makeText(context, "创建围栏回调成功", Toast.LENGTH_SHORT).show();
409 - Log.e(TAG, "onCreateFenceCallback: " + createFenceResponse.getFenceId()); 416 +// Log.e(TAG, "onCreateFenceCallback: " + createFenceResponse.getFenceId());
410 // 查询围栏监控者状态 417 // 查询围栏监控者状态
411 List<Long> list = new ArrayList<>(); 418 List<Long> list = new ArrayList<>();
412 list.add(createFenceResponse.getFenceId()); 419 list.add(createFenceResponse.getFenceId());
@@ -438,31 +445,32 @@ public class StepService extends Service implements SensorEventListener { @@ -438,31 +445,32 @@ public class StepService extends Service implements SensorEventListener {
438 // 监控状态回调 445 // 监控状态回调
439 @Override 446 @Override
440 public void onMonitoredStatusCallback(MonitoredStatusResponse monitoredStatusResponse) { 447 public void onMonitoredStatusCallback(MonitoredStatusResponse monitoredStatusResponse) {
441 - if (monitoredStatusResponse.getMonitoredStatusInfos() != null) {  
442 - Toast.makeText(getApplicationContext(), "围栏列表回调成功:个数:" + monitoredStatusResponse.getMonitoredStatusInfos().size(), Toast.LENGTH_SHORT).show(); 448 + if (monitoredStatusResponse.getMonitoredStatusInfos() == null || null == monitoredStatusResponse) {
  449 + return;
  450 +// Toast.makeText(getApplicationContext(), "围栏列表回调成功:个数:" + monitoredStatusResponse.getMonitoredStatusInfos().size(), Toast.LENGTH_SHORT).show();
443 } //查询监控对象状态响应结果 451 } //查询监控对象状态响应结果
444 List<MonitoredStatusInfo> monitoredStatusInfos = monitoredStatusResponse.getMonitoredStatusInfos(); 452 List<MonitoredStatusInfo> monitoredStatusInfos = monitoredStatusResponse.getMonitoredStatusInfos();
445 - if (monitoredStatusInfos == null) { 453 + if (monitoredStatusInfos == null || TextUtils.isEmpty(userStepEntity.getFenceId())) {
446 return; 454 return;
447 } 455 }
448 for (MonitoredStatusInfo monitoredStatusInfo : monitoredStatusInfos) { 456 for (MonitoredStatusInfo monitoredStatusInfo : monitoredStatusInfos) {
449 - if (monitoredStatusInfo.getFenceId() == userStepEntity.getFenceId()) { 457 + if (monitoredStatusInfo.getFenceId() == Long.parseLong(userStepEntity.getFenceId())) {
450 MonitoredStatus status = monitoredStatusInfo.getMonitoredStatus();//获取状态 458 MonitoredStatus status = monitoredStatusInfo.getMonitoredStatus();//获取状态
451 switch (status) { 459 switch (status) {
452 case in: 460 case in:
453 //监控的设备在围栏内 461 //监控的设备在围栏内
454 - Toast.makeText(getApplicationContext(), "监控的设备在围栏内", Toast.LENGTH_SHORT).show(); 462 +// Toast.makeText(getApplicationContext(), "监控的设备在围栏内", Toast.LENGTH_SHORT).show();
455 Log.e(TAG, "监控的设备在围栏内: "); 463 Log.e(TAG, "监控的设备在围栏内: ");
456 break; 464 break;
457 case out: 465 case out:
458 //监控的设备在围栏外 466 //监控的设备在围栏外
459 - Toast.makeText(getApplicationContext(), "监控的设备在围栏外", Toast.LENGTH_SHORT).show(); 467 +// Toast.makeText(getApplicationContext(), "监控的设备在围栏外", Toast.LENGTH_SHORT).show();
460 Log.e(TAG, "监控的设备在围栏外: "); 468 Log.e(TAG, "监控的设备在围栏外: ");
461 469
462 break; 470 break;
463 case unknown: 471 case unknown:
464 //监控的设备状态未知 472 //监控的设备状态未知
465 - Toast.makeText(getApplicationContext(), "监控的设备状态未知", Toast.LENGTH_SHORT).show(); 473 +// Toast.makeText(getApplicationContext(), "监控的设备状态未知", Toast.LENGTH_SHORT).show();
466 Log.e(TAG, "监控的设备状态未知: "); 474 Log.e(TAG, "监控的设备状态未知: ");
467 475
468 break; 476 break;
@@ -498,9 +506,9 @@ public class StepService extends Service implements SensorEventListener { @@ -498,9 +506,9 @@ public class StepService extends Service implements SensorEventListener {
498 Log.e(TAG, "onListMonitoredPersonCallback: "); 506 Log.e(TAG, "onListMonitoredPersonCallback: ");
499 } 507 }
500 }; 508 };
501 - if (userStepEntity != null) { 509 + if (userStepEntity != null &&!TextUtils.isEmpty(userStepEntity.getFenceId())) {
502 List<Long> fenids = new ArrayList<>(); 510 List<Long> fenids = new ArrayList<>();
503 - fenids.add(userStepEntity.getFenceId()); 511 + fenids.add(Long.parseLong(userStepEntity.getFenceId()));
504 MonitoredStatusRequest request1 = MonitoredStatusRequest.buildServerRequest(Constant.TAG, 512 MonitoredStatusRequest request1 = MonitoredStatusRequest.buildServerRequest(Constant.TAG,
505 Constant.SERVICE_ID, userId, fenids); 513 Constant.SERVICE_ID, userId, fenids);
506 if (mClient != null) { 514 if (mClient != null) {
@@ -525,11 +533,13 @@ public class StepService extends Service implements SensorEventListener { @@ -525,11 +533,13 @@ public class StepService extends Service implements SensorEventListener {
525 } 533 }
526 //设置围栏ID 534 //设置围栏ID
527 UserStepEntity userStepEntity = StepUtil.getUserStepData(getApplicationContext(), CommonInfo.getUserId(getApplicationContext())); 535 UserStepEntity userStepEntity = StepUtil.getUserStepData(getApplicationContext(), CommonInfo.getUserId(getApplicationContext()));
528 - if (userStepEntity == null) {  
529 - int fenceId = CommonInfo.getFenceId(getApplicationContext());  
530 - Log.e(TAG, "onStartTraceCallback: 保存的围栏id" + fenceId);  
531 - //设置围栏id  
532 - StepUtil.setFenceId(getApplicationContext(), CommonInfo.getUserId(getApplicationContext()), fenceId); 536 + if (userStepEntity != null) {
  537 + if (TextUtils.isEmpty(userStepEntity.getFenceId())) {
  538 + int fenceId = CommonInfo.getFenceId(getApplicationContext());
  539 +// Log.e(TAG, "onStartTraceCallback: 保存的围栏id" + fenceId);
  540 + //设置围栏id
  541 + StepUtil.setFenceId(getApplicationContext(), CommonInfo.getUserId(getApplicationContext()), fenceId + "");
  542 + }
533 } 543 }
534 entityName = userId; 544 entityName = userId;
535 initTodayData(userId); 545 initTodayData(userId);
@@ -642,11 +652,11 @@ public class StepService extends Service implements SensorEventListener { @@ -642,11 +652,11 @@ public class StepService extends Service implements SensorEventListener {
642 handler.removeCallbacks(speedRunnable); 652 handler.removeCallbacks(speedRunnable);
643 } 653 }
644 // Log.e("杀死", "MyTestService"); 654 // Log.e("杀死", "MyTestService");
645 - lastStep = 0;  
646 - hasStepCount = 0;  
647 - hasRecord = false;  
648 - CURRENT_STEP = 0;  
649 - previousStepCount = 0; 655 +// lastStep = 0;
  656 +// hasStepCount = 0;
  657 +// hasRecord = false;
  658 +// CURRENT_STEP = 0;
  659 +// previousStepCount = 0;
650 if (sensorManager != null) { 660 if (sensorManager != null) {
651 sensorManager.unregisterListener(StepService.this); 661 sensorManager.unregisterListener(StepService.this);
652 sensorManager = null; 662 sensorManager = null;
@@ -666,6 +676,10 @@ public class StepService extends Service implements SensorEventListener { @@ -666,6 +676,10 @@ public class StepService extends Service implements SensorEventListener {
666 else if (messageEvent.getMessageType() == Constant.SERVICE_STEP_COUNT_CONTINUE) { 676 else if (messageEvent.getMessageType() == Constant.SERVICE_STEP_COUNT_CONTINUE) {
667 pauseFlag = false; 677 pauseFlag = false;
668 } 678 }
  679 + //更新锁屏步数
  680 + else if (messageEvent.getMessageType() == Constant.SERVICE_STEP_COUNT_ONRESUME) {
  681 + updateNotification();
  682 + }
669 } 683 }
670 684
671 /** 685 /**
@@ -731,6 +745,7 @@ public class StepService extends Service implements SensorEventListener { @@ -731,6 +745,7 @@ public class StepService extends Service implements SensorEventListener {
731 } 745 }
732 746
733 private void updateNotification() { 747 private void updateNotification() {
  748 + save();
734 // Log.e(TAG, "updateNotification: 当前步数:" + CURRENT_STEP); 749 // Log.e(TAG, "updateNotification: 当前步数:" + CURRENT_STEP);
735 EventBus.getDefault().post(new MessageEvent(Constant.SERVICE_STEP_COUNT_UPDATE, CURRENT_STEP)); 750 EventBus.getDefault().post(new MessageEvent(Constant.SERVICE_STEP_COUNT_UPDATE, CURRENT_STEP));
736 updateSpeedStepFlag = false; 751 updateSpeedStepFlag = false;
@@ -1046,12 +1061,12 @@ public class StepService extends Service implements SensorEventListener { @@ -1046,12 +1061,12 @@ public class StepService extends Service implements SensorEventListener {
1046 //获取APP打开到现在的总步数=本次系统回调的总步数-APP打开之前已有的步数 1061 //获取APP打开到现在的总步数=本次系统回调的总步数-APP打开之前已有的步数
1047 // Log.e(TAG, "tempStep: " + tempStep + ",hasStepCount:" + hasStepCount); 1062 // Log.e(TAG, "tempStep: " + tempStep + ",hasStepCount:" + hasStepCount);
1048 int thisStepCount = tempStep - hasStepCount; 1063 int thisStepCount = tempStep - hasStepCount;
1049 -// Log.e(TAG, "onSensorChanged: thisStepCount" + thisStepCount); 1064 + Log.e(TAG, "onSensorChanged: thisStepCount" + thisStepCount);
1050 //本次有效步数=(APP打开后所记录的总步数-上一次APP打开后所记录的总步数) 1065 //本次有效步数=(APP打开后所记录的总步数-上一次APP打开后所记录的总步数)
1051 int thisStep = thisStepCount - previousStepCount; 1066 int thisStep = thisStepCount - previousStepCount;
1052 //记录最后一次APP打开到现在的总步数 1067 //记录最后一次APP打开到现在的总步数
1053 previousStepCount = thisStepCount; 1068 previousStepCount = thisStepCount;
1054 -// Log.e(TAG, "本次有效步数: thisStep" + thisStep + ",previousStepCount:" + previousStepCount); 1069 + Log.e(TAG, "本次有效步数: thisStep" + thisStep + ",previousStepCount:" + previousStepCount);
1055 //当用户点击暂停了 1070 //当用户点击暂停了
1056 if (pauseFlag) { 1071 if (pauseFlag) {
1057 thisStep = 0; 1072 thisStep = 0;
@@ -1063,7 +1078,7 @@ public class StepService extends Service implements SensorEventListener { @@ -1063,7 +1078,7 @@ public class StepService extends Service implements SensorEventListener {
1063 } 1078 }
1064 //总步数=现有的步数+本次有效步数 1079 //总步数=现有的步数+本次有效步数
1065 CURRENT_STEP += (thisStep); 1080 CURRENT_STEP += (thisStep);
1066 -// Log.e(TAG, "onSensorChanged: 加了以后" + CURRENT_STEP); 1081 + Log.e(TAG, "onSensorChanged: 加了以后" + CURRENT_STEP);
1067 lastStep = tempStep; 1082 lastStep = tempStep;
1068 } 1083 }
1069 } 1084 }
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/sql/dao/UserStepEntityDao.java
@@ -42,7 +42,7 @@ public class UserStepEntityDao extends AbstractDao&lt;UserStepEntity, String&gt; { @@ -42,7 +42,7 @@ public class UserStepEntityDao extends AbstractDao&lt;UserStepEntity, String&gt; {
42 public final static Property QueryTraceEndTime = new Property(15, long.class, "queryTraceEndTime", false, "QUERY_TRACE_END_TIME"); 42 public final static Property QueryTraceEndTime = new Property(15, long.class, "queryTraceEndTime", false, "QUERY_TRACE_END_TIME");
43 public final static Property QueryEntityName = new Property(16, String.class, "queryEntityName", false, "QUERY_ENTITY_NAME"); 43 public final static Property QueryEntityName = new Property(16, String.class, "queryEntityName", false, "QUERY_ENTITY_NAME");
44 public final static Property ContinueTime = new Property(17, long.class, "continueTime", false, "CONTINUE_TIME"); 44 public final static Property ContinueTime = new Property(17, long.class, "continueTime", false, "CONTINUE_TIME");
45 - public final static Property FenceId = new Property(18, long.class, "fenceId", false, "FENCE_ID"); 45 + public final static Property FenceId = new Property(18, String.class, "fenceId", false, "FENCE_ID");
46 public final static Property ImportPoint = new Property(19, String.class, "importPoint", false, "IMPORT_POINT"); 46 public final static Property ImportPoint = new Property(19, String.class, "importPoint", false, "IMPORT_POINT");
47 public final static Property StreetTitle = new Property(20, String.class, "streetTitle", false, "STREET_TITLE"); 47 public final static Property StreetTitle = new Property(20, String.class, "streetTitle", false, "STREET_TITLE");
48 public final static Property EndLatLng = new Property(21, String.class, "endLatLng", false, "END_LAT_LNG"); 48 public final static Property EndLatLng = new Property(21, String.class, "endLatLng", false, "END_LAT_LNG");
@@ -80,7 +80,7 @@ public class UserStepEntityDao extends AbstractDao&lt;UserStepEntity, String&gt; { @@ -80,7 +80,7 @@ public class UserStepEntityDao extends AbstractDao&lt;UserStepEntity, String&gt; {
80 "\"QUERY_TRACE_END_TIME\" INTEGER NOT NULL ," + // 15: queryTraceEndTime 80 "\"QUERY_TRACE_END_TIME\" INTEGER NOT NULL ," + // 15: queryTraceEndTime
81 "\"QUERY_ENTITY_NAME\" TEXT," + // 16: queryEntityName 81 "\"QUERY_ENTITY_NAME\" TEXT," + // 16: queryEntityName
82 "\"CONTINUE_TIME\" INTEGER NOT NULL ," + // 17: continueTime 82 "\"CONTINUE_TIME\" INTEGER NOT NULL ," + // 17: continueTime
83 - "\"FENCE_ID\" INTEGER NOT NULL ," + // 18: fenceId 83 + "\"FENCE_ID\" TEXT," + // 18: fenceId
84 "\"IMPORT_POINT\" TEXT," + // 19: importPoint 84 "\"IMPORT_POINT\" TEXT," + // 19: importPoint
85 "\"STREET_TITLE\" TEXT," + // 20: streetTitle 85 "\"STREET_TITLE\" TEXT," + // 20: streetTitle
86 "\"END_LAT_LNG\" TEXT," + // 21: endLatLng 86 "\"END_LAT_LNG\" TEXT," + // 21: endLatLng
@@ -146,7 +146,11 @@ public class UserStepEntityDao extends AbstractDao&lt;UserStepEntity, String&gt; { @@ -146,7 +146,11 @@ public class UserStepEntityDao extends AbstractDao&lt;UserStepEntity, String&gt; {
146 stmt.bindString(17, queryEntityName); 146 stmt.bindString(17, queryEntityName);
147 } 147 }
148 stmt.bindLong(18, entity.getContinueTime()); 148 stmt.bindLong(18, entity.getContinueTime());
149 - stmt.bindLong(19, entity.getFenceId()); 149 +
  150 + String fenceId = entity.getFenceId();
  151 + if (fenceId != null) {
  152 + stmt.bindString(19, fenceId);
  153 + }
150 154
151 String importPoint = entity.getImportPoint(); 155 String importPoint = entity.getImportPoint();
152 if (importPoint != null) { 156 if (importPoint != null) {
@@ -218,7 +222,11 @@ public class UserStepEntityDao extends AbstractDao&lt;UserStepEntity, String&gt; { @@ -218,7 +222,11 @@ public class UserStepEntityDao extends AbstractDao&lt;UserStepEntity, String&gt; {
218 stmt.bindString(17, queryEntityName); 222 stmt.bindString(17, queryEntityName);
219 } 223 }
220 stmt.bindLong(18, entity.getContinueTime()); 224 stmt.bindLong(18, entity.getContinueTime());
221 - stmt.bindLong(19, entity.getFenceId()); 225 +
  226 + String fenceId = entity.getFenceId();
  227 + if (fenceId != null) {
  228 + stmt.bindString(19, fenceId);
  229 + }
222 230
223 String importPoint = entity.getImportPoint(); 231 String importPoint = entity.getImportPoint();
224 if (importPoint != null) { 232 if (importPoint != null) {
@@ -263,7 +271,7 @@ public class UserStepEntityDao extends AbstractDao&lt;UserStepEntity, String&gt; { @@ -263,7 +271,7 @@ public class UserStepEntityDao extends AbstractDao&lt;UserStepEntity, String&gt; {
263 cursor.getLong(offset + 15), // queryTraceEndTime 271 cursor.getLong(offset + 15), // queryTraceEndTime
264 cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // queryEntityName 272 cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // queryEntityName
265 cursor.getLong(offset + 17), // continueTime 273 cursor.getLong(offset + 17), // continueTime
266 - cursor.getLong(offset + 18), // fenceId 274 + cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // fenceId
267 cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // importPoint 275 cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // importPoint
268 cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // streetTitle 276 cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // streetTitle
269 cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // endLatLng 277 cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // endLatLng
@@ -292,7 +300,7 @@ public class UserStepEntityDao extends AbstractDao&lt;UserStepEntity, String&gt; { @@ -292,7 +300,7 @@ public class UserStepEntityDao extends AbstractDao&lt;UserStepEntity, String&gt; {
292 entity.setQueryTraceEndTime(cursor.getLong(offset + 15)); 300 entity.setQueryTraceEndTime(cursor.getLong(offset + 15));
293 entity.setQueryEntityName(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16)); 301 entity.setQueryEntityName(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
294 entity.setContinueTime(cursor.getLong(offset + 17)); 302 entity.setContinueTime(cursor.getLong(offset + 17));
295 - entity.setFenceId(cursor.getLong(offset + 18)); 303 + entity.setFenceId(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
296 entity.setImportPoint(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19)); 304 entity.setImportPoint(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
297 entity.setStreetTitle(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20)); 305 entity.setStreetTitle(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
298 entity.setEndLatLng(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21)); 306 entity.setEndLatLng(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/sql/entity/UserStepEntity.java
@@ -27,15 +27,15 @@ public class UserStepEntity { @@ -27,15 +27,15 @@ public class UserStepEntity {
27 private long queryTraceEndTime;//从服务器获取的结束时间呢 27 private long queryTraceEndTime;//从服务器获取的结束时间呢
28 private String queryEntityName;//从服务器获取的运营人员的实体名称 28 private String queryEntityName;//从服务器获取的运营人员的实体名称
29 private long continueTime;//继续运动时间 29 private long continueTime;//继续运动时间
30 - private long fenceId;//围栏id 30 + private String fenceId;//围栏id
31 private String importPoint;//关键点 31 private String importPoint;//关键点
32 private String streetTitle;//赛事标题 32 private String streetTitle;//赛事标题
33 private String endLatLng;//终点坐标 33 private String endLatLng;//终点坐标
34 private boolean isArriveEndPoint;//是否到达终点 34 private boolean isArriveEndPoint;//是否到达终点
35 - @Generated(hash = 434792384) 35 + @Generated(hash = 640124145)
36 public UserStepEntity(String userId, String date, String stepCount, long recordTime, double caloriesCount, String serverTraceData, String startPoint, String endPoint, 36 public UserStepEntity(String userId, String date, String stepCount, long recordTime, double caloriesCount, String serverTraceData, String startPoint, String endPoint,
37 long startTimeStamp, long finishTimeStamp, String streetId, int pauseCount, long userPauseTimeStamp, long chronometerBase, long queryTraceStartTime, long queryTraceEndTime, 37 long startTimeStamp, long finishTimeStamp, String streetId, int pauseCount, long userPauseTimeStamp, long chronometerBase, long queryTraceStartTime, long queryTraceEndTime,
38 - String queryEntityName, long continueTime, long fenceId, String importPoint, String streetTitle, String endLatLng, boolean isArriveEndPoint) { 38 + String queryEntityName, long continueTime, String fenceId, String importPoint, String streetTitle, String endLatLng, boolean isArriveEndPoint) {
39 this.userId = userId; 39 this.userId = userId;
40 this.date = date; 40 this.date = date;
41 this.stepCount = stepCount; 41 this.stepCount = stepCount;
@@ -210,13 +210,6 @@ public class UserStepEntity { @@ -210,13 +210,6 @@ public class UserStepEntity {
210 this.continueTime = continueTime; 210 this.continueTime = continueTime;
211 } 211 }
212 212
213 - public long getFenceId() {  
214 - return this.fenceId;  
215 - }  
216 -  
217 - public void setFenceId(long fenceId) {  
218 - this.fenceId = fenceId;  
219 - }  
220 213
221 public String getImportPoint() { 214 public String getImportPoint() {
222 return this.importPoint; 215 return this.importPoint;
@@ -250,5 +243,14 @@ public class UserStepEntity { @@ -250,5 +243,14 @@ public class UserStepEntity {
250 this.endLatLng = endLatLng; 243 this.endLatLng = endLatLng;
251 } 244 }
252 245
  246 + public String getFenceId() {
  247 + return this.fenceId;
  248 + }
  249 +
  250 + public void setFenceId(String fenceId) {
  251 + this.fenceId = fenceId;
  252 + }
  253 +
  254 +
253 255
254 } 256 }
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/activity/RunLineActivity.java
@@ -39,8 +39,6 @@ public class RunLineActivity extends AppCompatActivity { @@ -39,8 +39,6 @@ public class RunLineActivity extends AppCompatActivity {
39 CommonInfo.setUserNickName(this,getIntent().getStringExtra("userName")); 39 CommonInfo.setUserNickName(this,getIntent().getStringExtra("userName"));
40 CommonInfo.setUserIcon(this,getIntent().getStringExtra("userIcon")); 40 CommonInfo.setUserIcon(this,getIntent().getStringExtra("userIcon"));
41 CommonInfo.setUserPhone(this,getIntent().getStringExtra("userPhone")); 41 CommonInfo.setUserPhone(this,getIntent().getStringExtra("userPhone"));
42 - }else {  
43 - CommonInfo.setUserId(this, "10513196");  
44 } 42 }
45 getSupportFragmentManager().beginTransaction().replace(R.id.run_line_container, new RunLineFragment()).commit(); 43 getSupportFragmentManager().beginTransaction().replace(R.id.run_line_container, new RunLineFragment()).commit();
46 } 44 }
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/activity/RunRaceDetailActivity.java
@@ -29,6 +29,7 @@ import com.cnlive.moudle.pedometer.ui.fragment.RunMainFragment; @@ -29,6 +29,7 @@ import com.cnlive.moudle.pedometer.ui.fragment.RunMainFragment;
29 import com.cnlive.moudle.pedometer.ui.fragment.RunRaceDetailFragment; 29 import com.cnlive.moudle.pedometer.ui.fragment.RunRaceDetailFragment;
30 import com.cnlive.moudle.pedometer.ui.fragment.RunningMapFragment; 30 import com.cnlive.moudle.pedometer.ui.fragment.RunningMapFragment;
31 import com.cnlive.moudle.pedometer.ui.widget.FivePersonIconView; 31 import com.cnlive.moudle.pedometer.ui.widget.FivePersonIconView;
  32 +import com.cnlive.moudle.pedometer.utils.CheckUtil;
32 import com.cnlive.moudle.pedometer.utils.MyMapUtil; 33 import com.cnlive.moudle.pedometer.utils.MyMapUtil;
33 import com.cnlive.moudle.pedometer.utils.NotificationUtil; 34 import com.cnlive.moudle.pedometer.utils.NotificationUtil;
34 import com.cnlive.moudle.pedometer.utils.StepUtil; 35 import com.cnlive.moudle.pedometer.utils.StepUtil;
@@ -94,7 +95,7 @@ public class RunRaceDetailActivity extends QMUIFragmentActivity { @@ -94,7 +95,7 @@ public class RunRaceDetailActivity extends QMUIFragmentActivity {
94 @Override 95 @Override
95 protected void onResume() { 96 protected void onResume() {
96 super.onResume(); 97 super.onResume();
97 - if (eventId != null) { 98 + if (!TextUtils.isEmpty(eventId)) {
98 CommonInfo.setStreetId(this, eventId); 99 CommonInfo.setStreetId(this, eventId);
99 Log.e("设置全局eventId", "onResume: " + eventId); 100 Log.e("设置全局eventId", "onResume: " + eventId);
100 } 101 }
@@ -107,7 +108,12 @@ public class RunRaceDetailActivity extends QMUIFragmentActivity { @@ -107,7 +108,12 @@ public class RunRaceDetailActivity extends QMUIFragmentActivity {
107 Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS); 108 Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
108 startActivityForResult(intent, 10); 109 startActivityForResult(intent, 10);
109 } else { 110 } else {
110 - getPermissionsWithTip(); 111 + boolean isSetBattery = CheckUtil.isIgnoringBatteryOptimizationss(RunRaceDetailActivity.this);
  112 + if (!isSetBattery) {
  113 + isSetBattery = CheckUtil.isIgnoringBatteryOptimizationss(RunRaceDetailActivity.this);
  114 + } else {
  115 + getPermissionsWithTip();
  116 + }
111 } 117 }
112 } 118 }
113 119
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/adapter/LineUpAgainAdapter.java
@@ -29,6 +29,26 @@ public class LineUpAgainAdapter extends RecyclerView.Adapter&lt;LineUpAgainAdapter. @@ -29,6 +29,26 @@ public class LineUpAgainAdapter extends RecyclerView.Adapter&lt;LineUpAgainAdapter.
29 private Context context; 29 private Context context;
30 private OnClickListener onClickListener; 30 private OnClickListener onClickListener;
31 private OnRestartUploadClickListener onRestartUploadClickListener; 31 private OnRestartUploadClickListener onRestartUploadClickListener;
  32 + private OnDeleteClickListener onDeleteClickListener;
  33 +
  34 + public int getListSize() {
  35 + if (null == list) {
  36 + return 0;
  37 + } else {
  38 + return list.size();
  39 + }
  40 + }
  41 +
  42 + public void updateDeleteList(int position) {
  43 + if (null != list) {
  44 + list.remove(position);
  45 + notifyDataSetChanged();
  46 + }
  47 + }
  48 +
  49 + public void setOnDeleteClickListener(OnDeleteClickListener onDeleteClickListener) {
  50 + this.onDeleteClickListener = onDeleteClickListener;
  51 + }
32 52
33 public void setOnRestartUploadClickListener(OnRestartUploadClickListener onRestartUploadClickListener) { 53 public void setOnRestartUploadClickListener(OnRestartUploadClickListener onRestartUploadClickListener) {
34 this.onRestartUploadClickListener = onRestartUploadClickListener; 54 this.onRestartUploadClickListener = onRestartUploadClickListener;
@@ -79,6 +99,14 @@ public class LineUpAgainAdapter extends RecyclerView.Adapter&lt;LineUpAgainAdapter. @@ -79,6 +99,14 @@ public class LineUpAgainAdapter extends RecyclerView.Adapter&lt;LineUpAgainAdapter.
79 myHolder.up_record_speed.setText(list.get(i).getSpeed()); 99 myHolder.up_record_speed.setText(list.get(i).getSpeed());
80 //设置步数 100 //设置步数
81 myHolder.up_record_step.setText(list.get(i).getStep()); 101 myHolder.up_record_step.setText(list.get(i).getStep());
  102 + myHolder.tv_delete.setOnClickListener(new View.OnClickListener() {
  103 + @Override
  104 + public void onClick(View view) {
  105 + if (null != onDeleteClickListener) {
  106 + onDeleteClickListener.onDeleteClickListener(i);
  107 + }
  108 + }
  109 + });
82 } 110 }
83 111
84 } 112 }
@@ -99,6 +127,7 @@ public class LineUpAgainAdapter extends RecyclerView.Adapter&lt;LineUpAgainAdapter. @@ -99,6 +127,7 @@ public class LineUpAgainAdapter extends RecyclerView.Adapter&lt;LineUpAgainAdapter.
99 TextView up_record_speed; 127 TextView up_record_speed;
100 TextView up_record_step; 128 TextView up_record_step;
101 TextView again_up; 129 TextView again_up;
  130 + TextView tv_delete;
102 RelativeLayout ry_re; 131 RelativeLayout ry_re;
103 132
104 public MyHolder(@NonNull View itemView) { 133 public MyHolder(@NonNull View itemView) {
@@ -112,6 +141,7 @@ public class LineUpAgainAdapter extends RecyclerView.Adapter&lt;LineUpAgainAdapter. @@ -112,6 +141,7 @@ public class LineUpAgainAdapter extends RecyclerView.Adapter&lt;LineUpAgainAdapter.
112 up_record_speed = itemView.findViewById(R.id.up_record_speed); 141 up_record_speed = itemView.findViewById(R.id.up_record_speed);
113 up_record_step = itemView.findViewById(R.id.up_record_step); 142 up_record_step = itemView.findViewById(R.id.up_record_step);
114 again_up = itemView.findViewById(R.id.again_up); 143 again_up = itemView.findViewById(R.id.again_up);
  144 + tv_delete = itemView.findViewById(R.id.tv_delete);
115 ry_re = itemView.findViewById(R.id.ry_re); 145 ry_re = itemView.findViewById(R.id.ry_re);
116 } 146 }
117 } 147 }
@@ -121,6 +151,10 @@ public class LineUpAgainAdapter extends RecyclerView.Adapter&lt;LineUpAgainAdapter. @@ -121,6 +151,10 @@ public class LineUpAgainAdapter extends RecyclerView.Adapter&lt;LineUpAgainAdapter.
121 void onClickListener(FailedEntity bean, int position); 151 void onClickListener(FailedEntity bean, int position);
122 } 152 }
123 153
  154 + public interface OnDeleteClickListener {
  155 + void onDeleteClickListener(int position);
  156 + }
  157 +
124 public interface OnRestartUploadClickListener { 158 public interface OnRestartUploadClickListener {
125 void onRestartUploadClickListener(FailedEntity failedEntity); 159 void onRestartUploadClickListener(FailedEntity failedEntity);
126 } 160 }
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/adapter/MyRecordAdapter.java
@@ -95,10 +95,17 @@ public class MyRecordAdapter extends RecyclerView.Adapter&lt;MyRecordAdapter.MyView @@ -95,10 +95,17 @@ public class MyRecordAdapter extends RecyclerView.Adapter&lt;MyRecordAdapter.MyView
95 } 95 }
96 96
97 private void toRaking(String eventId){ 97 private void toRaking(String eventId){
98 - String baseWebUrl = AppConfig.isDebug() ? "http://wjjh5test.cnlive.com/cnSportListOver.html" : "http://wjjh5.cnlive.com/cnSportListOver.html"; 98 + String baseWebUrl,title;
  99 + if(state.equals("0")){
  100 + title = "排行榜";
  101 + baseWebUrl = AppConfig.isDebug() ? "http://wjjh5test.cnlive.com/cnSportList.html" : "http://wjjh5.cnlive.com/cnSportList.html";
  102 + }else {
  103 + title = "总排行榜";
  104 + baseWebUrl = AppConfig.isDebug() ? "http://wjjh5test.cnlive.com/cnSportListOver.html" : "http://wjjh5.cnlive.com/cnSportListOver.html";
  105 + }
99 ARouter.getInstance().build("/web/WebViewColorActivity") 106 ARouter.getInstance().build("/web/WebViewColorActivity")
100 .withString("url", baseWebUrl +"?sid="+CommonInfo.getUserId(context)+"&eventId="+eventId) 107 .withString("url", baseWebUrl +"?sid="+CommonInfo.getUserId(context)+"&eventId="+eventId)
101 - .withString("title","总排行榜") 108 + .withString("title",title)
102 .navigation(context); 109 .navigation(context);
103 } 110 }
104 111
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/ALLScoreDetailFragment.java
@@ -52,11 +52,16 @@ public class ALLScoreDetailFragment extends QMUIFragment&lt;ALLScoreDetailFragmentV @@ -52,11 +52,16 @@ public class ALLScoreDetailFragment extends QMUIFragment&lt;ALLScoreDetailFragmentV
52 runningFinishBean = (RunningFinishBean) getArguments().getSerializable("runningFinishBean"); 52 runningFinishBean = (RunningFinishBean) getArguments().getSerializable("runningFinishBean");
53 if (runningFinishBean != null) { 53 if (runningFinishBean != null) {
54 if (getMvpView() != null) { 54 if (getMvpView() != null) {
55 - getMvpView().initMap();  
56 - getMvpView().initView(runningFinishBean);  
57 - if (getPresenter() != null) {  
58 - getPresenter().queryHistoryTrace(getActivity(), runningFinishBean);  
59 - } 55 + getMvpView().initMap(new ALLScoreDetailFragmentView.MapCallBack() {
  56 + @Override
  57 + public void onMapLoadFinish() {
  58 + getMvpView().initView(runningFinishBean);
  59 + if (getPresenter() != null) {
  60 + getPresenter().queryHistoryTrace(getActivity(), runningFinishBean);
  61 + }
  62 + }
  63 + });
  64 +
60 } 65 }
61 } 66 }
62 } 67 }
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/LineUpAgainFragment.java
@@ -11,11 +11,18 @@ import com.cnlive.libs.base.frame.fragment.MvpBindingFragment; @@ -11,11 +11,18 @@ import com.cnlive.libs.base.frame.fragment.MvpBindingFragment;
11 import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; 11 import com.cnlive.moudle.pedometer.commonInfo.CommonInfo;
12 import com.cnlive.moudle.pedometer.frame.presenter.LineUpAgainPresenter; 12 import com.cnlive.moudle.pedometer.frame.presenter.LineUpAgainPresenter;
13 import com.cnlive.moudle.pedometer.frame.view.LineUpAgainView; 13 import com.cnlive.moudle.pedometer.frame.view.LineUpAgainView;
  14 +import com.cnlive.moudle.pedometer.model.Constant;
  15 +import com.cnlive.moudle.pedometer.model.MessageEvent;
14 import com.cnlive.moudle.pedometer.sql.entity.FailedEntity; 16 import com.cnlive.moudle.pedometer.sql.entity.FailedEntity;
  17 +import com.cnlive.moudle.pedometer.utils.ChineseToSpeechUtil;
15 import com.cnlive.moudle.pedometer.utils.StepUtil; 18 import com.cnlive.moudle.pedometer.utils.StepUtil;
16 import com.example.moudle_pedometer.R; 19 import com.example.moudle_pedometer.R;
17 import com.example.moudle_pedometer.databinding.FragmentLineUpAgainBinding; 20 import com.example.moudle_pedometer.databinding.FragmentLineUpAgainBinding;
18 21
  22 +import org.greenrobot.eventbus.EventBus;
  23 +import org.greenrobot.eventbus.Subscribe;
  24 +import org.greenrobot.eventbus.ThreadMode;
  25 +
19 import java.util.List; 26 import java.util.List;
20 27
21 /** 28 /**
@@ -37,6 +44,7 @@ public class LineUpAgainFragment extends MvpBindingFragment&lt;LineUpAgainView, Lin @@ -37,6 +44,7 @@ public class LineUpAgainFragment extends MvpBindingFragment&lt;LineUpAgainView, Lin
37 @Override 44 @Override
38 public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { 45 public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
39 super.onViewCreated(view, savedInstanceState); 46 super.onViewCreated(view, savedInstanceState);
  47 +
40 List<FailedEntity> failedEntities = StepUtil.getFailListData(getActivity(), CommonInfo.getUserId(getActivity())); 48 List<FailedEntity> failedEntities = StepUtil.getFailListData(getActivity(), CommonInfo.getUserId(getActivity()));
41 if (getMvpView() != null) { 49 if (getMvpView() != null) {
42 getMvpView().initView(); 50 getMvpView().initView();
@@ -63,4 +71,8 @@ public class LineUpAgainFragment extends MvpBindingFragment&lt;LineUpAgainView, Lin @@ -63,4 +71,8 @@ public class LineUpAgainFragment extends MvpBindingFragment&lt;LineUpAgainView, Lin
63 } 71 }
64 } 72 }
65 } 73 }
  74 +
  75 +
  76 +
  77 +
66 } 78 }
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/OnGoingFragment.java
@@ -15,7 +15,7 @@ import com.example.moudle_pedometer.databinding.FragmentRunRaceDetailBinding; @@ -15,7 +15,7 @@ import com.example.moudle_pedometer.databinding.FragmentRunRaceDetailBinding;
15 import com.qmuiteam.qmui.util.QMUIStatusBarHelper; 15 import com.qmuiteam.qmui.util.QMUIStatusBarHelper;
16 16
17 public class OnGoingFragment extends QMUIFragment<OnGoingFragmentView, OnGoingFragmentPresenter, FragmentRunRaceDetailBinding> { 17 public class OnGoingFragment extends QMUIFragment<OnGoingFragmentView, OnGoingFragmentPresenter, FragmentRunRaceDetailBinding> {
18 - private String eventId; 18 + public String eventId;
19 19
20 public static OnGoingFragment newInstance(String eventId) { 20 public static OnGoingFragment newInstance(String eventId) {
21 OnGoingFragment fragment = new OnGoingFragment(); 21 OnGoingFragment fragment = new OnGoingFragment();
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/RunMainFragment.java
@@ -127,6 +127,14 @@ public class RunMainFragment extends QMUIFragment&lt;RunMainFragmentView, RunMainFr @@ -127,6 +127,14 @@ public class RunMainFragment extends QMUIFragment&lt;RunMainFragmentView, RunMainFr
127 } 127 }
128 128
129 @Override 129 @Override
  130 + public void onResume() {
  131 + super.onResume();
  132 + if (getMvpView() != null) {
  133 + getMvpView().onResume();
  134 + }
  135 + }
  136 +
  137 + @Override
130 public void onDestroy() { 138 public void onDestroy() {
131 139
132 super.onDestroy(); 140 super.onDestroy();
@@ -186,7 +194,7 @@ public class RunMainFragment extends QMUIFragment&lt;RunMainFragmentView, RunMainFr @@ -186,7 +194,7 @@ public class RunMainFragment extends QMUIFragment&lt;RunMainFragmentView, RunMainFr
186 if (mVibrator != null) { 194 if (mVibrator != null) {
187 //设置震动周期,数组表示时间:等待+执行,单位是毫秒,下面操作代表:等待100,执行100,等待100,执行1000, 195 //设置震动周期,数组表示时间:等待+执行,单位是毫秒,下面操作代表:等待100,执行100,等待100,执行1000,
188 //后面的数字如果为-1代表不重复,之执行一次,其他代表会重复,0代表从数组的第0个位置开始 196 //后面的数字如果为-1代表不重复,之执行一次,其他代表会重复,0代表从数组的第0个位置开始
189 - mVibrator.vibrate(new long[]{100, 1000, 100, 1000}, -1); 197 + mVibrator.vibrate(new long[]{Constant.VIBRATOR_DELAY_TIME, Constant.VIBRATOR_RUN_TIME, Constant.VIBRATOR_DELAY_TIME, Constant.VIBRATOR_RUN_TIME}, Constant.VIBRATOR_REPEAT_TIME);
190 } 198 }
191 if (tipDialog != null) { 199 if (tipDialog != null) {
192 tipDialog.setTipMsg("您已偏离路径轨迹\n请您计时回归路径!"); 200 tipDialog.setTipMsg("您已偏离路径轨迹\n请您计时回归路径!");
@@ -199,7 +207,7 @@ public class RunMainFragment extends QMUIFragment&lt;RunMainFragmentView, RunMainFr @@ -199,7 +207,7 @@ public class RunMainFragment extends QMUIFragment&lt;RunMainFragmentView, RunMainFr
199 if (mVibrator != null) { 207 if (mVibrator != null) {
200 //设置震动周期,数组表示时间:等待+执行,单位是毫秒,下面操作代表:等待100,执行100,等待100,执行1000, 208 //设置震动周期,数组表示时间:等待+执行,单位是毫秒,下面操作代表:等待100,执行100,等待100,执行1000,
201 //后面的数字如果为-1代表不重复,之执行一次,其他代表会重复,0代表从数组的第0个位置开始 209 //后面的数字如果为-1代表不重复,之执行一次,其他代表会重复,0代表从数组的第0个位置开始
202 - mVibrator.vibrate(new long[]{100, 1000, 100, 1000}, -1); 210 + mVibrator.vibrate(new long[]{Constant.VIBRATOR_DELAY_TIME, Constant.VIBRATOR_RUN_TIME, Constant.VIBRATOR_DELAY_TIME, Constant.VIBRATOR_RUN_TIME}, Constant.VIBRATOR_REPEAT_TIME);
203 } 211 }
204 if (tipDialog != null) { 212 if (tipDialog != null) {
205 tipDialog.setTipMsg("您已回归轨迹\n继续参与运动吧"); 213 tipDialog.setTipMsg("您已回归轨迹\n继续参与运动吧");
@@ -208,6 +216,14 @@ public class RunMainFragment extends QMUIFragment&lt;RunMainFragmentView, RunMainFr @@ -208,6 +216,14 @@ public class RunMainFragment extends QMUIFragment&lt;RunMainFragmentView, RunMainFr
208 } 216 }
209 } 217 }
210 218
  219 + @Override
  220 + public void onStop() {
  221 + super.onStop();
  222 + if (null != getMvpView()) {
  223 + getMvpView().onStop();
  224 + }
  225 + }
  226 +
211 /** 227 /**
212 * 屏蔽边缘返回 228 * 屏蔽边缘返回
213 * 杨帅 229 * 杨帅
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/RunningMapFragment.java
@@ -150,6 +150,7 @@ public class RunningMapFragment extends QMUIFragment&lt;RunningMapFragmentView, Run @@ -150,6 +150,7 @@ public class RunningMapFragment extends QMUIFragment&lt;RunningMapFragmentView, Run
150 if (getMvpView() != null) { 150 if (getMvpView() != null) {
151 //取消注册传感器监听 151 //取消注册传感器监听
152 mSensorManager.unregisterListener(getMvpView()); 152 mSensorManager.unregisterListener(getMvpView());
  153 + getMvpView().onStop();
153 } 154 }
154 ChineseToSpeechUtil.destroy(); 155 ChineseToSpeechUtil.destroy();
155 156
@@ -196,7 +197,7 @@ public class RunningMapFragment extends QMUIFragment&lt;RunningMapFragmentView, Run @@ -196,7 +197,7 @@ public class RunningMapFragment extends QMUIFragment&lt;RunningMapFragmentView, Run
196 if (mVibrator != null) { 197 if (mVibrator != null) {
197 //设置震动周期,数组表示时间:等待+执行,单位是毫秒,下面操作代表:等待100,执行100,等待100,执行1000, 198 //设置震动周期,数组表示时间:等待+执行,单位是毫秒,下面操作代表:等待100,执行100,等待100,执行1000,
198 //后面的数字如果为-1代表不重复,之执行一次,其他代表会重复,0代表从数组的第0个位置开始 199 //后面的数字如果为-1代表不重复,之执行一次,其他代表会重复,0代表从数组的第0个位置开始
199 - mVibrator.vibrate(new long[]{100, 1000, 100, 1000}, -1); 200 + mVibrator.vibrate(new long[]{Constant.VIBRATOR_DELAY_TIME, Constant.VIBRATOR_RUN_TIME, Constant.VIBRATOR_DELAY_TIME, Constant.VIBRATOR_RUN_TIME}, Constant.VIBRATOR_REPEAT_TIME);
200 } 201 }
201 if (tipDialog != null) { 202 if (tipDialog != null) {
202 tipDialog.setTipMsg("您已偏离路径轨迹\n请您计时回归路径!"); 203 tipDialog.setTipMsg("您已偏离路径轨迹\n请您计时回归路径!");
@@ -209,7 +210,7 @@ public class RunningMapFragment extends QMUIFragment&lt;RunningMapFragmentView, Run @@ -209,7 +210,7 @@ public class RunningMapFragment extends QMUIFragment&lt;RunningMapFragmentView, Run
209 if (mVibrator != null) { 210 if (mVibrator != null) {
210 //设置震动周期,数组表示时间:等待+执行,单位是毫秒,下面操作代表:等待100,执行100,等待100,执行1000, 211 //设置震动周期,数组表示时间:等待+执行,单位是毫秒,下面操作代表:等待100,执行100,等待100,执行1000,
211 //后面的数字如果为-1代表不重复,之执行一次,其他代表会重复,0代表从数组的第0个位置开始 212 //后面的数字如果为-1代表不重复,之执行一次,其他代表会重复,0代表从数组的第0个位置开始
212 - mVibrator.vibrate(new long[]{100, 1000, 100, 1000}, -1); 213 + mVibrator.vibrate(new long[]{Constant.VIBRATOR_DELAY_TIME, Constant.VIBRATOR_RUN_TIME, Constant.VIBRATOR_DELAY_TIME, Constant.VIBRATOR_RUN_TIME}, Constant.VIBRATOR_REPEAT_TIME);
213 } 214 }
214 if (tipDialog != null) { 215 if (tipDialog != null) {
215 tipDialog.setTipMsg("您已回归轨迹\n继续参与运动吧"); 216 tipDialog.setTipMsg("您已回归轨迹\n继续参与运动吧");
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/SelfRecordFragment.java
@@ -11,6 +11,8 @@ import com.cnlive.libs.base.frame.fragment.MvpBindingFragment; @@ -11,6 +11,8 @@ import com.cnlive.libs.base.frame.fragment.MvpBindingFragment;
11 import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; 11 import com.cnlive.moudle.pedometer.commonInfo.CommonInfo;
12 import com.cnlive.moudle.pedometer.frame.presenter.SelfRecordPresenter; 12 import com.cnlive.moudle.pedometer.frame.presenter.SelfRecordPresenter;
13 import com.cnlive.moudle.pedometer.frame.view.SelfRecordView; 13 import com.cnlive.moudle.pedometer.frame.view.SelfRecordView;
  14 +import com.cnlive.moudle.pedometer.model.Constant;
  15 +import com.cnlive.moudle.pedometer.model.MessageEvent;
14 import com.cnlive.moudle.pedometer.sql.entity.FailedEntity; 16 import com.cnlive.moudle.pedometer.sql.entity.FailedEntity;
15 import com.cnlive.moudle.pedometer.utils.StepUtil; 17 import com.cnlive.moudle.pedometer.utils.StepUtil;
16 import com.example.moudle_pedometer.R; 18 import com.example.moudle_pedometer.R;
@@ -19,6 +21,10 @@ import com.scwang.smartrefresh.layout.api.RefreshLayout; @@ -19,6 +21,10 @@ import com.scwang.smartrefresh.layout.api.RefreshLayout;
19 import com.scwang.smartrefresh.layout.listener.OnLoadMoreListener; 21 import com.scwang.smartrefresh.layout.listener.OnLoadMoreListener;
20 import com.scwang.smartrefresh.layout.listener.OnRefreshListener; 22 import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
21 23
  24 +import org.greenrobot.eventbus.EventBus;
  25 +import org.greenrobot.eventbus.Subscribe;
  26 +import org.greenrobot.eventbus.ThreadMode;
  27 +
22 import java.util.List; 28 import java.util.List;
23 29
24 import q.rorbin.badgeview.QBadgeView; 30 import q.rorbin.badgeview.QBadgeView;
@@ -42,6 +48,9 @@ public class SelfRecordFragment extends MvpBindingFragment&lt;SelfRecordView, SelfR @@ -42,6 +48,9 @@ public class SelfRecordFragment extends MvpBindingFragment&lt;SelfRecordView, SelfR
42 @Override 48 @Override
43 public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { 49 public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
44 super.onViewCreated(view, savedInstanceState); 50 super.onViewCreated(view, savedInstanceState);
  51 + if (!EventBus.getDefault().isRegistered(this)) {
  52 + EventBus.getDefault().register(this);
  53 + }
45 if (getMvpView() != null) getMvpView().initView(); 54 if (getMvpView() != null) getMvpView().initView();
46 getData(completeStatus); 55 getData(completeStatus);
47 56
@@ -69,7 +78,7 @@ public class SelfRecordFragment extends MvpBindingFragment&lt;SelfRecordView, SelfR @@ -69,7 +78,7 @@ public class SelfRecordFragment extends MvpBindingFragment&lt;SelfRecordView, SelfR
69 78
70 79
71 private void getData(int completeStatu) { 80 private void getData(int completeStatu) {
72 - if(completeStatu != completeStatus) currentPage = 1; 81 + if (completeStatu != completeStatus) currentPage = 1;
73 this.completeStatus = completeStatu; 82 this.completeStatus = completeStatu;
74 getPresenter().getData(getActivity(), CommonInfo.getUserId(getActivity()), completeStatus, currentPage, pageSize); 83 getPresenter().getData(getActivity(), CommonInfo.getUserId(getActivity()), completeStatus, currentPage, pageSize);
75 if (completeStatus == 1) { 84 if (completeStatus == 1) {
@@ -114,4 +123,22 @@ public class SelfRecordFragment extends MvpBindingFragment&lt;SelfRecordView, SelfR @@ -114,4 +123,22 @@ public class SelfRecordFragment extends MvpBindingFragment&lt;SelfRecordView, SelfR
114 qBadgeView.setBadgeNumber(failedEntities.size()); 123 qBadgeView.setBadgeNumber(failedEntities.size());
115 } 124 }
116 } 125 }
  126 +
  127 + @Subscribe(threadMode = ThreadMode.MAIN)
  128 + public void Event(MessageEvent messageEvent) {
  129 + //刷新我的记录页面
  130 + if (messageEvent.getMessageType() == Constant.UPDATE_MYSELF_RECORD_LIST) {
  131 + if (getMvpView() != null) {
  132 + getData(completeStatus);
  133 + }
  134 + }
  135 + }
  136 +
  137 + @Override
  138 + public void onDestroy() {
  139 + super.onDestroy();
  140 + if (EventBus.getDefault().isRegistered(this)) {
  141 + EventBus.getDefault().unregister(this);
  142 + }
  143 + }
117 } 144 }
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/utils/CheckUtil.java
@@ -8,25 +8,39 @@ import android.net.Uri; @@ -8,25 +8,39 @@ import android.net.Uri;
8 import android.os.PowerManager; 8 import android.os.PowerManager;
9 import android.provider.Settings; 9 import android.provider.Settings;
10 10
  11 +import com.cnlive.libs.base.util.AlertUtil;
  12 +
11 import static android.content.Context.POWER_SERVICE; 13 import static android.content.Context.POWER_SERVICE;
12 14
13 public class CheckUtil { 15 public class CheckUtil {
14 16
  17 + /**
  18 + * 锤子手机不能检测电池白名单,会崩溃
  19 + *
  20 + * @param context
  21 + * @return
  22 + */
15 public static boolean isIgnoringBatteryOptimizationss(Activity context) { 23 public static boolean isIgnoringBatteryOptimizationss(Activity context) {
16 - PowerManager powerManager = (PowerManager) context.getSystemService(POWER_SERVICE);  
17 - if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {  
18 - boolean hasIgnored = powerManager.isIgnoringBatteryOptimizations(context.getPackageName());  
19 - if (!hasIgnored) {  
20 - Intent intent = new Intent(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS);  
21 - intent.setData(Uri.parse("package:" + context.getPackageName()));  
22 - PackageManager pm = context.getPackageManager();  
23 - if (intent.resolveActivity(pm) != null) {  
24 - context.startActivity(intent); 24 + String carrier = android.os.Build.MANUFACTURER;
  25 + if (!"smartisan".equals(carrier)) {
  26 + PowerManager powerManager = (PowerManager) context.getSystemService(POWER_SERVICE);
  27 + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {
  28 + boolean hasIgnored = powerManager.isIgnoringBatteryOptimizations(context.getPackageName());
  29 + if (!hasIgnored) {
  30 + Intent intent = new Intent(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS);
  31 + intent.setData(Uri.parse("package:" + context.getPackageName()));
  32 + PackageManager pm = context.getPackageManager();
  33 + if (intent.resolveActivity(pm) != null) {
  34 + context.startActivity(intent);
  35 + }
  36 + AlertUtil.showDeftToast(context, "请选择允许加入电池优化白名单,否则将会影响您的正常使用!");
  37 + return false;
  38 + } else {
  39 + return true;
25 } 40 }
26 - return false;  
27 - } else {  
28 - return true;  
29 } 41 }
  42 + } else {
  43 + return true;
30 } 44 }
31 return false; 45 return false;
32 } 46 }
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/utils/MyMapUtil.java
@@ -68,7 +68,7 @@ public class MyMapUtil { @@ -68,7 +68,7 @@ public class MyMapUtil {
68 return null; 68 return null;
69 } 69 }
70 try { 70 try {
71 - Bitmap pointBitmap = BitmapUtil.getBitmapFromDp(context, BitmapFactory.decodeResource(context.getResources(), startIconRes), 17, 30); 71 + Bitmap pointBitmap = BitmapUtil.getBitmapFromDp(context, BitmapFactory.decodeResource(context.getResources(), startIconRes), 25, 25);
72 OverlayOptions startOptions = null; 72 OverlayOptions startOptions = null;
73 if (pointBitmap != null) { 73 if (pointBitmap != null) {
74 startOptions = new MarkerOptions() 74 startOptions = new MarkerOptions()
@@ -211,24 +211,26 @@ public class MyMapUtil { @@ -211,24 +211,26 @@ public class MyMapUtil {
211 public static boolean checkIsFinishTrace(List<LatLng> importPoints, List<LatLng> trackPoints, double passRate) { 211 public static boolean checkIsFinishTrace(List<LatLng> importPoints, List<LatLng> trackPoints, double passRate) {
212 HashMap<Integer, Boolean> importHash = new HashMap<>(); 212 HashMap<Integer, Boolean> importHash = new HashMap<>();
213 for (int i = 0; i < importPoints.size(); i++) { 213 for (int i = 0; i < importPoints.size(); i++) {
214 - if (i % 3 != 0) {  
215 - importPoints.remove(i);  
216 - }  
217 - }  
218 - for (int i = 0; i < importPoints.size(); i++) {  
219 importHash.put(i, false); 214 importHash.put(i, false);
220 } 215 }
221 //开始比较数据 216 //开始比较数据
222 int index = 0; 217 int index = 0;
  218 + boolean isContinue = false;
223 for (int i = 0; i < importPoints.size(); i++) { 219 for (int i = 0; i < importPoints.size(); i++) {
  220 + isContinue = false;
224 LatLng importLatLng = importPoints.get(i); 221 LatLng importLatLng = importPoints.get(i);
225 for (int j = index; j < trackPoints.size(); j++) { 222 for (int j = index; j < trackPoints.size(); j++) {
226 double distance = DistanceUtil.getDistance(importLatLng, trackPoints.get(j)); 223 double distance = DistanceUtil.getDistance(importLatLng, trackPoints.get(j));
227 if (distance < Constant.CHECK_ACCURACY) { 224 if (distance < Constant.CHECK_ACCURACY) {
228 importHash.put(i, true); 225 importHash.put(i, true);
229 index = j; 226 index = j;
  227 + isContinue = true;
  228 + break;
230 } 229 }
231 } 230 }
  231 + if (isContinue) {
  232 + continue;
  233 + }
232 } 234 }
233 //输出 235 //输出
234 int result = 0; 236 int result = 0;
@@ -374,16 +376,20 @@ public class MyMapUtil { @@ -374,16 +376,20 @@ public class MyMapUtil {
374 * @return true 表示开启 376 * @return true 表示开启
375 */ 377 */
376 public static final boolean isOPenGps(final Context context) { 378 public static final boolean isOPenGps(final Context context) {
377 - LocationManager locationManager  
378 - = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);  
379 - // 通过GPS卫星定位,定位级别可以精确到街(通过24颗卫星定位,在室外和空旷的地方定位准确、速度快)  
380 - boolean gps = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);  
381 - // 通过WLAN或移动网络(3G/2G)确定的位置(也称作AGPS,辅助GPS定位。主要用于在室内或遮盖物(建筑群或茂密的深林等)密集的地方定位)  
382 - boolean network = locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);  
383 - if (gps || network) { 379 + try {
  380 + LocationManager locationManager
  381 + = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
  382 + // 通过GPS卫星定位,定位级别可以精确到街(通过24颗卫星定位,在室外和空旷的地方定位准确、速度快)
  383 + boolean gps = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);
  384 + // 通过WLAN或移动网络(3G/2G)确定的位置(也称作AGPS,辅助GPS定位。主要用于在室内或遮盖物(建筑群或茂密的深林等)密集的地方定位)
  385 + boolean network = locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);
  386 + if (gps) {
  387 + return true;
  388 + }
  389 + } catch (Exception e) {
  390 + //异常就返回true
384 return true; 391 return true;
385 } 392 }
386 -  
387 return false; 393 return false;
388 } 394 }
389 395
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/utils/NotificationUtil.java
@@ -7,6 +7,8 @@ import android.provider.Settings; @@ -7,6 +7,8 @@ import android.provider.Settings;
7 import android.support.v4.app.NotificationManagerCompat; 7 import android.support.v4.app.NotificationManagerCompat;
8 import android.widget.Toast; 8 import android.widget.Toast;
9 9
  10 +import com.cnlive.libs.base.util.AlertUtil;
  11 +
10 import static android.app.Notification.EXTRA_CHANNEL_ID; 12 import static android.app.Notification.EXTRA_CHANNEL_ID;
11 import static android.provider.Settings.EXTRA_APP_PACKAGE; 13 import static android.provider.Settings.EXTRA_APP_PACKAGE;
12 14
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/utils/StepUtil.java
@@ -35,6 +35,7 @@ public class StepUtil { @@ -35,6 +35,7 @@ public class StepUtil {
35 return UUID.randomUUID().toString().replace("-", ""); 35 return UUID.randomUUID().toString().replace("-", "");
36 } 36 }
37 37
  38 +
38 public static void initDataBase(Context context, String uid) { 39 public static void initDataBase(Context context, String uid) {
39 try { 40 try {
40 if (null == getUserStepData(context, uid)) { 41 if (null == getUserStepData(context, uid)) {
@@ -50,6 +51,50 @@ public class StepUtil { @@ -50,6 +51,50 @@ public class StepUtil {
50 } 51 }
51 52
52 /** 53 /**
  54 + * 更新删除临时保存数据
  55 + *
  56 + * @param context
  57 + * @param entity
  58 + */
  59 + public static void updateFailData(Context context, FailedEntity entity) {
  60 + try {
  61 + DbCore.init(context, dbName);
  62 + if (entity != null && !TextUtils.isEmpty(entity.getUuid())) {
  63 + DbCore.getDaoSession().getFailedEntityDao().update(entity);
  64 + }
  65 + } catch (Exception e) {
  66 + Log.e(TAG, "deleteTempSaveFailData: " + e.toString());
  67 + }
  68 +
  69 + }
  70 +
  71 + /**
  72 + * 获取暂存的失败数据
  73 + *
  74 + * @param context
  75 + * @param uid
  76 + * @return
  77 + */
  78 + public static FailedEntity getTempSaveFailByUUID(Context context, String uid, String UUID) {
  79 + try {
  80 + DbCore.init(context, dbName);
  81 + List<FailedEntity> list = DbCore.getDaoSession().getFailedEntityDao().queryBuilder().where(FailedEntityDao.Properties.Uid.eq(uid), FailedEntityDao.Properties.Uuid.eq(UUID)).list();
  82 + if (list != null && list.size() > 0) {
  83 + if (list.get(0) == null) {
  84 + return null;
  85 + } else {
  86 + return list.get(0);
  87 + }
  88 + }
  89 + return null;
  90 + } catch (Exception e) {
  91 + Log.e(TAG, "getTempSaveFailByUUID: " + e.toString());
  92 + return null;
  93 + }
  94 +
  95 + }
  96 +
  97 + /**
53 * 删除临时保存数据 98 * 删除临时保存数据
54 * 99 *
55 * @param context 100 * @param context
@@ -95,11 +140,11 @@ public class StepUtil { @@ -95,11 +140,11 @@ public class StepUtil {
95 140
96 } 141 }
97 142
98 - //获取上传失败列表 143 + //获取上传失败列表,按时间倒序
99 public static List<FailedEntity> getFailListData(Context context, String uid) { 144 public static List<FailedEntity> getFailListData(Context context, String uid) {
100 try { 145 try {
101 DbCore.init(context, dbName); 146 DbCore.init(context, dbName);
102 - List<FailedEntity> list = DbCore.getDaoSession().getFailedEntityDao().queryBuilder().where(FailedEntityDao.Properties.Uid.eq(uid)).list(); 147 + List<FailedEntity> list = DbCore.getDaoSession().getFailedEntityDao().queryBuilder().where(FailedEntityDao.Properties.Uid.eq(uid)).orderDesc(FailedEntityDao.Properties.CreatTimeStamp).list();
103 return list; 148 return list;
104 } catch (Exception e) { 149 } catch (Exception e) {
105 Log.e(TAG, "getFailListData: " + e.toString()); 150 Log.e(TAG, "getFailListData: " + e.toString());
@@ -170,7 +215,7 @@ public class StepUtil { @@ -170,7 +215,7 @@ public class StepUtil {
170 * @param uid 215 * @param uid
171 * @param fenceId 216 * @param fenceId
172 */ 217 */
173 - public static void setFenceId(Context context, String uid, long fenceId) { 218 + public static void setFenceId(Context context, String uid, String fenceId) {
174 try { 219 try {
175 if (getUserStepData(context, uid) != null) { 220 if (getUserStepData(context, uid) != null) {
176 UserStepEntity entity = getUserStepData(context, uid); 221 UserStepEntity entity = getUserStepData(context, uid);
@@ -258,8 +303,8 @@ public class StepUtil { @@ -258,8 +303,8 @@ public class StepUtil {
258 */ 303 */
259 public static void updateStepData(Context context, UserStepEntity userStepEntity) { 304 public static void updateStepData(Context context, UserStepEntity userStepEntity) {
260 try { 305 try {
  306 + DbCore.init(context, dbName);
261 if (userStepEntity != null) { 307 if (userStepEntity != null) {
262 - DbCore.init(context, dbName);  
263 DbCore.getDaoSession().getUserStepEntityDao().update(userStepEntity); 308 DbCore.getDaoSession().getUserStepEntityDao().update(userStepEntity);
264 } 309 }
265 } catch (Exception e) { 310 } catch (Exception e) {
moudle_pedometer/src/main/res/drawable-hdpi/background.png deleted 100644 → 0

3.67 KB

moudle_pedometer/src/main/res/drawable-hdpi/background.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/bg_bg.png deleted 100644 → 0

3.49 KB

moudle_pedometer/src/main/res/drawable-hdpi/bg_bg.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/bg_tips_bottom_center.png deleted 100644 → 0

765 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/bg_tips_bottom_center.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/bmcg.png deleted 100644 → 0

14.1 KB

moudle_pedometer/src/main/res/drawable-hdpi/bmcg.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/bmcg_has.png deleted 100644 → 0

14.5 KB

moudle_pedometer/src/main/res/drawable-hdpi/bmcg_has.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/bmcg_no.png deleted 100644 → 0

14 KB

moudle_pedometer/src/main/res/drawable-hdpi/bmcg_no.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/bmcg_tak.png deleted 100644 → 0

14.4 KB

moudle_pedometer/src/main/res/drawable-hdpi/bmcg_tak.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/circle_point_raduis.png deleted 100644 → 0

2.73 KB

moudle_pedometer/src/main/res/drawable-hdpi/circle_point_raduis.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/circle_white_shadow_bg.png deleted 100644 → 0

2.03 KB

moudle_pedometer/src/main/res/drawable-hdpi/circle_white_shadow_bg.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/crown.png deleted 100644 → 0

915 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/crown.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/gps_tip_bg.png deleted 100644 → 0

1.38 KB

moudle_pedometer/src/main/res/drawable-hdpi/gps_tip_bg.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/gps_white_shadow.png deleted 100644 → 0

1.62 KB

moudle_pedometer/src/main/res/drawable-hdpi/gps_white_shadow.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/icon_back.png deleted 100644 → 0

702 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/icon_back.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/icon_end.png deleted 100644 → 0

2.85 KB

moudle_pedometer/src/main/res/drawable-hdpi/icon_end.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/icon_map_import.png deleted 100644 → 0

1.4 KB

moudle_pedometer/src/main/res/drawable-hdpi/icon_map_import.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/icon_no_fail_line.png deleted 100644 → 0

14.5 KB

moudle_pedometer/src/main/res/drawable-hdpi/icon_no_fail_line.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/icon_run_route.png deleted 100644 → 0

1.15 KB

moudle_pedometer/src/main/res/drawable-hdpi/icon_run_route.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/icon_share.png deleted 100644 → 0

974 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/icon_share.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/icon_slide_up.png deleted 100644 → 0

469 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/icon_slide_up.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/icon_start.png deleted 100644 → 0

2.97 KB

moudle_pedometer/src/main/res/drawable-hdpi/icon_start.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/icon_step.png deleted 100644 → 0

1.22 KB

moudle_pedometer/src/main/res/drawable-hdpi/icon_step.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/more.png deleted 100644 → 0

414 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/more.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/no_selected.png deleted 100644 → 0

931 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/no_selected.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/rt_ic_home_map.png deleted 100644 → 0

7.73 KB

moudle_pedometer/src/main/res/drawable-hdpi/rt_ic_home_map.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/rt_ic_location_blank.png deleted 100644 → 0

1.7 KB

moudle_pedometer/src/main/res/drawable-hdpi/rt_ic_location_blank.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/rt_training_button_pause.png deleted 100644 → 0

252 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/rt_training_button_pause.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/rt_training_button_stop.png deleted 100644 → 0

114 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/rt_training_button_stop.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/rt_training_gps_0.png deleted 100644 → 0

414 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/rt_training_gps_0.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/rt_training_gps_1.png deleted 100644 → 0

306 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/rt_training_gps_1.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/rt_training_gps_2.png deleted 100644 → 0

440 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/rt_training_gps_2.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/rt_training_gps_3.png deleted 100644 → 0

444 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/rt_training_gps_3.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/selected.png deleted 100644 → 0

1.38 KB

moudle_pedometer/src/main/res/drawable-hdpi/selected.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/share_background.png deleted 100644 → 0

208 KB

moudle_pedometer/src/main/res/drawable-hdpi/share_background.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/share_img.png deleted 100644 → 0

975 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/share_img.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/share_logo.png deleted 100644 → 0

8.58 KB

moudle_pedometer/src/main/res/drawable-hdpi/share_logo.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/speed.png deleted 100644 → 0

818 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/speed.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/sport_dropdown.png deleted 100644 → 0

322 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/sport_dropdown.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/sport_location.png deleted 100644 → 0

758 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/sport_location.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/sport_people.png deleted 100644 → 0

903 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/sport_people.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/sport_speed.png deleted 100644 → 0

1.8 KB

moudle_pedometer/src/main/res/drawable-hdpi/sport_speed.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/sport_step.png deleted 100644 → 0

2.02 KB

moudle_pedometer/src/main/res/drawable-hdpi/sport_step.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/sport_time.png deleted 100644 → 0

773 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/sport_time.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/sport_time_cost.png deleted 100644 → 0

1.86 KB

moudle_pedometer/src/main/res/drawable-hdpi/sport_time_cost.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/sport_type.png deleted 100644 → 0

652 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/sport_type.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/step.png deleted 100644 → 0

1014 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/step.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/time_cost.png deleted 100644 → 0

863 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/time_cost.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/wdjl_backgroud.png deleted 100644 → 0

37.1 KB

moudle_pedometer/src/main/res/drawable-hdpi/wdjl_backgroud.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/white_shadow_bg.png deleted 100644 → 0

6.33 KB

moudle_pedometer/src/main/res/drawable-hdpi/white_shadow_bg.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/xqt_share.png deleted 100644 → 0

2.84 KB

moudle_pedometer/src/main/res/drawable-hdpi/xqt_share.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/xqy_return.png deleted 100644 → 0

2.39 KB

moudle_pedometer/src/main/res/drawable-hdpi/xqy_return.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/yplx_registered.png deleted 100644 → 0

5.84 KB

moudle_pedometer/src/main/res/drawable-hdpi/yplx_registered.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/background.png deleted 100644 → 0

5.44 KB

moudle_pedometer/src/main/res/drawable-xhdpi/background.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/bg_bg.png deleted 100644 → 0

5.18 KB

moudle_pedometer/src/main/res/drawable-xhdpi/bg_bg.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/bg_tips_bottom_center.png deleted 100644 → 0

968 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/bg_tips_bottom_center.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/bmcg.png deleted 100644 → 0

15.7 KB

moudle_pedometer/src/main/res/drawable-xhdpi/bmcg.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/bmcg_has.png deleted 100644 → 0

16.6 KB

moudle_pedometer/src/main/res/drawable-xhdpi/bmcg_has.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/bmcg_no.png deleted 100644 → 0

15.8 KB

moudle_pedometer/src/main/res/drawable-xhdpi/bmcg_no.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/bmcg_tak.png deleted 100644 → 0

16.3 KB

moudle_pedometer/src/main/res/drawable-xhdpi/bmcg_tak.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/circle_point_raduis.png deleted 100644 → 0

3.11 KB

moudle_pedometer/src/main/res/drawable-xhdpi/circle_point_raduis.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/circle_white_shadow_bg.png deleted 100644 → 0

2.44 KB

moudle_pedometer/src/main/res/drawable-xhdpi/circle_white_shadow_bg.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/crown.png deleted 100644 → 0

1.07 KB

moudle_pedometer/src/main/res/drawable-xhdpi/crown.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/gps_tip_bg.png deleted 100644 → 0

1.89 KB

moudle_pedometer/src/main/res/drawable-xhdpi/gps_tip_bg.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/gps_white_shadow.png deleted 100644 → 0

1.99 KB

moudle_pedometer/src/main/res/drawable-xhdpi/gps_white_shadow.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/icon_back.png deleted 100644 → 0

855 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/icon_back.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/icon_end.png deleted 100644 → 0

3.58 KB

moudle_pedometer/src/main/res/drawable-xhdpi/icon_end.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/icon_map_import.png deleted 100644 → 0

1.21 KB

moudle_pedometer/src/main/res/drawable-xhdpi/icon_map_import.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/icon_no_fail_line.png deleted 100644 → 0

16.6 KB

moudle_pedometer/src/main/res/drawable-xhdpi/icon_no_fail_line.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/icon_run_route.png deleted 100644 → 0

1.36 KB

moudle_pedometer/src/main/res/drawable-xhdpi/icon_run_route.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/icon_run_white_back.png deleted 100644 → 0

705 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/icon_run_white_back.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/icon_share.png deleted 100644 → 0

1.08 KB

moudle_pedometer/src/main/res/drawable-xhdpi/icon_share.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/icon_slide_up.png deleted 100644 → 0

517 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/icon_slide_up.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/icon_start.png deleted 100644 → 0

3.73 KB

moudle_pedometer/src/main/res/drawable-xhdpi/icon_start.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/icon_step.png deleted 100644 → 0

1.31 KB

moudle_pedometer/src/main/res/drawable-xhdpi/icon_step.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/icon_white_back.png deleted 100644 → 0

705 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/icon_white_back.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/more.png deleted 100644 → 0

459 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/more.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/no_selected.png deleted 100644 → 0

831 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/no_selected.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/rt_ic_home_map.png deleted 100644 → 0

7.52 KB

moudle_pedometer/src/main/res/drawable-xhdpi/rt_ic_home_map.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/rt_ic_location_blank.png deleted 100644 → 0

2.04 KB

moudle_pedometer/src/main/res/drawable-xhdpi/rt_ic_location_blank.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/rt_training_button_pause.png deleted 100644 → 0

152 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/rt_training_button_pause.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/rt_training_button_resume.png deleted 100644 → 0

555 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/rt_training_button_resume.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/rt_training_button_stop.png deleted 100644 → 0

130 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/rt_training_button_stop.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/rt_training_gps_2.png deleted 100644 → 0

212 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/rt_training_gps_2.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/selected.png deleted 100644 → 0

1.38 KB

moudle_pedometer/src/main/res/drawable-xhdpi/selected.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/share_background.png deleted 100644 → 0

272 KB

moudle_pedometer/src/main/res/drawable-xhdpi/share_background.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/share_img.png deleted 100644 → 0

1.07 KB

moudle_pedometer/src/main/res/drawable-xhdpi/share_img.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/share_logo.png deleted 100644 → 0

9.28 KB

moudle_pedometer/src/main/res/drawable-xhdpi/share_logo.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/speed.png deleted 100644 → 0

917 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/speed.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/sport_dropdown.png deleted 100644 → 0

370 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/sport_dropdown.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/sport_location.png deleted 100644 → 0

793 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/sport_location.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/sport_people.png deleted 100644 → 0

1.01 KB

moudle_pedometer/src/main/res/drawable-xhdpi/sport_people.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/sport_speed.png deleted 100644 → 0

1.9 KB

moudle_pedometer/src/main/res/drawable-xhdpi/sport_speed.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/sport_step.png deleted 100644 → 0

2.15 KB

moudle_pedometer/src/main/res/drawable-xhdpi/sport_step.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/sport_time.png deleted 100644 → 0

777 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/sport_time.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/sport_time_cost.png deleted 100644 → 0

1.97 KB

moudle_pedometer/src/main/res/drawable-xhdpi/sport_time_cost.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/sport_type.png deleted 100644 → 0

747 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/sport_type.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/step.png deleted 100644 → 0

1.19 KB

moudle_pedometer/src/main/res/drawable-xhdpi/step.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/time_cost.png deleted 100644 → 0

979 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/time_cost.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/top_back_black.png deleted 100644 → 0

468 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/top_back_black.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/wdjl_backgroud.png deleted 100644 → 0

119 KB

moudle_pedometer/src/main/res/drawable-xhdpi/wdjl_backgroud.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/white_shadow_bg.png deleted 100644 → 0

9.53 KB

moudle_pedometer/src/main/res/drawable-xhdpi/white_shadow_bg.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/xqt_share.png deleted 100644 → 0

2.34 KB

moudle_pedometer/src/main/res/drawable-xhdpi/xqt_share.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/xqy_return.png deleted 100644 → 0

2.16 KB

moudle_pedometer/src/main/res/drawable-xhdpi/xqy_return.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xhdpi/yplx_registered.png deleted 100644 → 0

3.96 KB

moudle_pedometer/src/main/res/drawable-xhdpi/yplx_registered.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/background.png deleted 100644 → 0

11.2 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/background.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/bg_bg.png deleted 100644 → 0

10.6 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/bg_bg.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/bg_tips_bottom_center.png deleted 100644 → 0

1.79 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/bg_tips_bottom_center.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/bmcg.png deleted 100644 → 0

30.6 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/bmcg.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/bmcg_has.png deleted 100644 → 0

31.9 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/bmcg_has.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/bmcg_hsa.png deleted 100644 → 0

31.9 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/bmcg_hsa.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/bmcg_no.png deleted 100644 → 0

30.5 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/bmcg_no.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/bmcg_tak.png deleted 100644 → 0

31.4 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/bmcg_tak.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/circle_point_raduis.png deleted 100644 → 0

6.3 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/circle_point_raduis.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/circle_white_shadow_bg.png deleted 100644 → 0

4.66 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/circle_white_shadow_bg.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/crown.png deleted 100644 → 0

1.85 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/crown.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/gps_tip_bg.png deleted 100644 → 0

3.54 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/gps_tip_bg.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/gps_white_shadow.png deleted 100644 → 0

3.79 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/gps_white_shadow.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/icon_back.png deleted 100644 → 0

1.49 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/icon_back.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/icon_end.png deleted 100644 → 0

6.98 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/icon_end.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/icon_map_import.png deleted 100644 → 0

3.51 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/icon_map_import.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/icon_no_fail_line.png deleted 100644 → 0

32 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/icon_no_fail_line.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/icon_run_route.png deleted 100644 → 0

2.61 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/icon_run_route.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/icon_run_white_back.png deleted 100644 → 0

1.17 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/icon_run_white_back.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/icon_share.png deleted 100644 → 0

2.09 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/icon_share.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/icon_slide_up.png deleted 100644 → 0

1002 Bytes

moudle_pedometer/src/main/res/drawable-xxhdpi/icon_slide_up.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/icon_start.png deleted 100644 → 0

7.3 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/icon_start.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/icon_step.png deleted 100644 → 0

2.81 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/icon_step.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/icon_white_back.png deleted 100644 → 0

1.17 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/icon_white_back.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/more.png deleted 100644 → 0

776 Bytes

moudle_pedometer/src/main/res/drawable-xxhdpi/more.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/no_selected.png deleted 100644 → 0

1.92 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/no_selected.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/rt_ic_home_map.png deleted 100644 → 0

23.2 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/rt_ic_home_map.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/rt_ic_location_blank.png deleted 100644 → 0

3.71 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/rt_ic_location_blank.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/rt_training_button_pause.png deleted 100644 → 0

427 Bytes

moudle_pedometer/src/main/res/drawable-xxhdpi/rt_training_button_pause.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/rt_training_button_resume.png deleted 100644 → 0

854 Bytes

moudle_pedometer/src/main/res/drawable-xxhdpi/rt_training_button_resume.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/rt_training_button_stop.png deleted 100644 → 0

207 Bytes

moudle_pedometer/src/main/res/drawable-xxhdpi/rt_training_button_stop.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/rt_training_gps_0.png deleted 100644 → 0

501 Bytes

moudle_pedometer/src/main/res/drawable-xxhdpi/rt_training_gps_0.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/rt_training_gps_1.png deleted 100644 → 0

384 Bytes

moudle_pedometer/src/main/res/drawable-xxhdpi/rt_training_gps_1.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/rt_training_gps_2.png deleted 100644 → 0

723 Bytes

moudle_pedometer/src/main/res/drawable-xxhdpi/rt_training_gps_2.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/rt_training_gps_3.png deleted 100644 → 0

636 Bytes

moudle_pedometer/src/main/res/drawable-xxhdpi/rt_training_gps_3.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/selected.png deleted 100644 → 0

3.01 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/selected.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/share_background.png deleted 100644 → 0

633 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/share_background.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/share_img.png deleted 100644 → 0

2.04 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/share_img.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/share_logo.png deleted 100644 → 0

23.4 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/share_logo.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/speed.png deleted 100644 → 0

1.8 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/speed.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/sport_dropdown.png deleted 100644 → 0

725 Bytes

moudle_pedometer/src/main/res/drawable-xxhdpi/sport_dropdown.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/sport_location.png deleted 100644 → 0

1.39 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/sport_location.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/sport_people.png deleted 100644 → 0

1.84 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/sport_people.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/sport_speed.png deleted 100644 → 0

3.74 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/sport_speed.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/sport_step.png deleted 100644 → 0

4.42 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/sport_step.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/sport_time.png deleted 100644 → 0

1.51 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/sport_time.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/sport_time_cost.png deleted 100644 → 0

3.91 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/sport_time_cost.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/sport_type.png deleted 100644 → 0

1.29 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/sport_type.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/step.png deleted 100644 → 0

2.33 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/step.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/time_cost.png deleted 100644 → 0

1.85 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/time_cost.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/top_back_black.png deleted 100644 → 0

877 Bytes

moudle_pedometer/src/main/res/drawable-xxhdpi/top_back_black.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/wdjl_backgroud.png deleted 100644 → 0

175 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/wdjl_backgroud.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/white_shadow_bg.png deleted 100644 → 0

18.7 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/white_shadow_bg.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/xqt_share.png deleted 100644 → 0

7.72 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/xqt_share.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/xqy_return.png deleted 100644 → 0

6.58 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/xqy_return.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/drawable-xxhdpi/yplx_registered.png deleted 100644 → 0

17.1 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/yplx_registered.webp 0 → 100644
No preview for this file type
moudle_pedometer/src/main/res/layout/fragment_run_line.xml
@@ -26,9 +26,9 @@ @@ -26,9 +26,9 @@
26 android:layout_centerVertical="true" 26 android:layout_centerVertical="true"
27 android:layout_marginLeft="10dp" 27 android:layout_marginLeft="10dp"
28 android:layout_toRightOf="@id/back_btn" 28 android:layout_toRightOf="@id/back_btn"
29 - android:drawableRight="@drawable/sport_dropdown"  
30 android:drawablePadding="7dp" 29 android:drawablePadding="7dp"
31 android:text="@string/beijing" 30 android:text="@string/beijing"
  31 + android:visibility="gone"
32 android:textColor="#333333" 32 android:textColor="#333333"
33 android:textSize="15sp" /> 33 android:textSize="15sp" />
34 34
moudle_pedometer/src/main/res/layout/fragment_run_main.xml
@@ -4,10 +4,12 @@ @@ -4,10 +4,12 @@
4 <LinearLayout 4 <LinearLayout
5 android:layout_width="match_parent" 5 android:layout_width="match_parent"
6 android:layout_height="match_parent" 6 android:layout_height="match_parent"
  7 + android:background="@color/run_main_bg"
7 android:orientation="vertical"> 8 android:orientation="vertical">
8 9
9 <FrameLayout 10 <FrameLayout
10 android:layout_width="match_parent" 11 android:layout_width="match_parent"
  12 + android:background="@color/run_main_bg"
11 android:layout_height="match_parent"> 13 android:layout_height="match_parent">
12 14
13 <LinearLayout 15 <LinearLayout
moudle_pedometer/src/main/res/layout/fragment_run_race_detail.xml
@@ -71,7 +71,7 @@ @@ -71,7 +71,7 @@
71 android:id="@+id/scrollView" 71 android:id="@+id/scrollView"
72 android:layout_width="match_parent" 72 android:layout_width="match_parent"
73 android:layout_height="match_parent" 73 android:layout_height="match_parent"
74 - android:layout_marginTop="40dp" 74 + android:paddingTop="40dp"
75 android:scrollbars="none"> 75 android:scrollbars="none">
76 76
77 <LinearLayout 77 <LinearLayout
@@ -151,7 +151,7 @@ @@ -151,7 +151,7 @@
151 android:layout_gravity="top" 151 android:layout_gravity="top"
152 android:background="@color/run_main_bg" 152 android:background="@color/run_main_bg"
153 android:gravity="center" 153 android:gravity="center"
154 - android:visibility="gone"> 154 + android:visibility="invisible">
155 155
156 <LinearLayout 156 <LinearLayout
157 android:id="@+id/ll_top_back" 157 android:id="@+id/ll_top_back"
moudle_pedometer/src/main/res/layout/line_up__item_view.xml
@@ -4,42 +4,43 @@ @@ -4,42 +4,43 @@
4 <data> 4 <data>
5 5
6 </data> 6 </data>
  7 +
7 <RelativeLayout 8 <RelativeLayout
8 android:id="@+id/ry_re" 9 android:id="@+id/ry_re"
9 android:layout_width="match_parent" 10 android:layout_width="match_parent"
10 android:layout_height="wrap_content" 11 android:layout_height="wrap_content"
11 - android:background="@drawable/background"  
12 - android:layout_marginTop="5dp"  
13 android:layout_marginLeft="5dp" 12 android:layout_marginLeft="5dp"
  13 + android:layout_marginTop="5dp"
14 android:layout_marginRight="5dp" 14 android:layout_marginRight="5dp"
  15 + android:background="@drawable/background"
15 android:padding="15dp"> 16 android:padding="15dp">
16 17
17 <TextView 18 <TextView
18 android:id="@+id/up_day" 19 android:id="@+id/up_day"
19 android:layout_width="wrap_content" 20 android:layout_width="wrap_content"
20 android:layout_height="wrap_content" 21 android:layout_height="wrap_content"
  22 + android:text="5月1日"
21 android:textColor="#333333" 23 android:textColor="#333333"
22 - android:textSize="14sp"  
23 - android:text="5月1日" /> 24 + android:textSize="14sp" />
24 25
25 <TextView 26 <TextView
26 android:id="@+id/up_record_time" 27 android:id="@+id/up_record_time"
27 android:layout_width="wrap_content" 28 android:layout_width="wrap_content"
28 android:layout_height="wrap_content" 29 android:layout_height="wrap_content"
29 - android:layout_toRightOf="@id/up_day"  
30 android:layout_marginLeft="15dp" 30 android:layout_marginLeft="15dp"
  31 + android:layout_toRightOf="@id/up_day"
  32 + android:text="15:30"
31 android:textColor="#999999" 33 android:textColor="#999999"
32 - android:textSize="14sp"  
33 - android:text="15:30" /> 34 + android:textSize="14sp" />
34 35
35 <TextView 36 <TextView
36 android:layout_width="wrap_content" 37 android:layout_width="wrap_content"
37 android:layout_height="wrap_content" 38 android:layout_height="wrap_content"
  39 + android:layout_alignParentRight="true"
38 android:layout_marginRight="10dp" 40 android:layout_marginRight="10dp"
39 - android:textColor="#FE4E4E"  
40 - android:textSize="12sp"  
41 android:text="@string/up_fail" 41 android:text="@string/up_fail"
42 - android:layout_alignParentRight="true"/> 42 + android:textColor="#FE4E4E"
  43 + android:textSize="12sp" />
43 44
44 <LinearLayout 45 <LinearLayout
45 android:id="@+id/ly" 46 android:id="@+id/ly"
@@ -52,10 +53,10 @@ @@ -52,10 +53,10 @@
52 android:id="@+id/up_item_img" 53 android:id="@+id/up_item_img"
53 android:layout_width="80dp" 54 android:layout_width="80dp"
54 android:layout_height="80dp" 55 android:layout_height="80dp"
55 - android:scaleType="fitXY"  
56 - android:visibility="gone"  
57 android:layout_gravity="center_vertical" 56 android:layout_gravity="center_vertical"
58 - android:src="@drawable/defaults" /> 57 + android:scaleType="fitXY"
  58 + android:src="@drawable/defaults"
  59 + android:visibility="gone" />
59 60
60 <RelativeLayout 61 <RelativeLayout
61 android:layout_width="match_parent" 62 android:layout_width="match_parent"
@@ -67,31 +68,31 @@ @@ -67,31 +68,31 @@
67 android:layout_width="wrap_content" 68 android:layout_width="wrap_content"
68 android:layout_height="wrap_content" 69 android:layout_height="wrap_content"
69 android:singleLine="true" 70 android:singleLine="true"
70 - android:textSize="12sp"  
71 - android:textColor="#333333"/> 71 + android:textColor="#333333"
  72 + android:textSize="12sp" />
72 73
73 <LinearLayout 74 <LinearLayout
74 android:layout_width="wrap_content" 75 android:layout_width="wrap_content"
75 android:layout_height="wrap_content" 76 android:layout_height="wrap_content"
76 android:layout_centerVertical="true" 77 android:layout_centerVertical="true"
77 android:orientation="horizontal"> 78 android:orientation="horizontal">
  79 +
78 <TextView 80 <TextView
79 android:id="@+id/up_kilometer_num" 81 android:id="@+id/up_kilometer_num"
80 android:layout_width="wrap_content" 82 android:layout_width="wrap_content"
81 android:layout_height="wrap_content" 83 android:layout_height="wrap_content"
82 - android:textColor="#333333"  
83 - android:textSize="30sp"  
84 android:layout_centerVertical="true" 84 android:layout_centerVertical="true"
85 - /> 85 + android:textColor="#333333"
  86 + android:textSize="30sp" />
86 87
87 <TextView 88 <TextView
88 android:layout_width="wrap_content" 89 android:layout_width="wrap_content"
89 android:layout_height="wrap_content" 90 android:layout_height="wrap_content"
90 android:layout_centerVertical="true" 91 android:layout_centerVertical="true"
  92 + android:layout_marginLeft="5dp"
91 android:text="@string/kilometer" 93 android:text="@string/kilometer"
92 android:textColor="#333333" 94 android:textColor="#333333"
93 - android:textSize="12sp"  
94 - android:layout_marginLeft="5dp"/> 95 + android:textSize="12sp" />
95 </LinearLayout> 96 </LinearLayout>
96 97
97 98
@@ -107,7 +108,7 @@ @@ -107,7 +108,7 @@
107 android:drawableRight="@drawable/time_cost" 108 android:drawableRight="@drawable/time_cost"
108 android:drawablePadding="5dp" 109 android:drawablePadding="5dp"
109 android:textColor="#333333" 110 android:textColor="#333333"
110 - android:textSize="13sp"/> 111 + android:textSize="13sp" />
111 112
112 <TextView 113 <TextView
113 android:id="@+id/up_record_speed" 114 android:id="@+id/up_record_speed"
@@ -117,7 +118,7 @@ @@ -117,7 +118,7 @@
117 android:drawableRight="@drawable/speed" 118 android:drawableRight="@drawable/speed"
118 android:drawablePadding="5dp" 119 android:drawablePadding="5dp"
119 android:textColor="#333333" 120 android:textColor="#333333"
120 - android:textSize="13sp"/> 121 + android:textSize="13sp" />
121 122
122 <TextView 123 <TextView
123 android:id="@+id/up_record_step" 124 android:id="@+id/up_record_step"
@@ -125,7 +126,7 @@ @@ -125,7 +126,7 @@
125 android:layout_height="wrap_content" 126 android:layout_height="wrap_content"
126 android:layout_marginLeft="20dp" 127 android:layout_marginLeft="20dp"
127 android:drawableRight="@drawable/step" 128 android:drawableRight="@drawable/step"
128 - android:drawablePadding="5dp"/> 129 + android:drawablePadding="5dp" />
129 </LinearLayout> 130 </LinearLayout>
130 </RelativeLayout> 131 </RelativeLayout>
131 </LinearLayout> 132 </LinearLayout>
@@ -134,26 +135,45 @@ @@ -134,26 +135,45 @@
134 android:id="@+id/view" 135 android:id="@+id/view"
135 android:layout_width="match_parent" 136 android:layout_width="match_parent"
136 android:layout_height="1dp" 137 android:layout_height="1dp"
137 - android:background="@color/line"  
138 android:layout_below="@id/ly" 138 android:layout_below="@id/ly"
139 - /> 139 + android:background="@color/line" />
140 140
141 - <TextView  
142 - android:id="@+id/again_up"  
143 - android:layout_width="wrap_content" 141 + <LinearLayout
  142 + android:layout_width="match_parent"
144 android:layout_height="wrap_content" 143 android:layout_height="wrap_content"
145 - android:layout_alignParentRight="true"  
146 android:layout_below="@id/view" 144 android:layout_below="@id/view"
147 android:layout_marginTop="10dp" 145 android:layout_marginTop="10dp"
148 android:layout_marginRight="5dp" 146 android:layout_marginRight="5dp"
149 - android:background="@drawable/green_raduis_bg"  
150 - android:text="@string/again_up"  
151 - android:textColor="#36C28D"  
152 - android:textSize="12sp"  
153 - android:paddingTop="7dp"  
154 - android:paddingBottom="7dp"  
155 - android:paddingRight="10dp"  
156 - android:paddingLeft="10dp"  
157 - /> 147 + android:gravity="center|right">
  148 +
  149 + <TextView
  150 + android:id="@+id/again_up"
  151 + android:layout_width="wrap_content"
  152 + android:layout_height="wrap_content"
  153 + android:layout_alignParentRight="true"
  154 + android:layout_marginRight="15dp"
  155 + android:background="@drawable/green_raduis_bg"
  156 + android:paddingLeft="10dp"
  157 + android:paddingTop="7dp"
  158 + android:paddingRight="10dp"
  159 + android:paddingBottom="7dp"
  160 + android:text="@string/again_up"
  161 + android:textColor="#36C28D"
  162 + android:textSize="12sp" />
  163 +
  164 + <TextView
  165 + android:id="@+id/tv_delete"
  166 + android:layout_width="wrap_content"
  167 + android:layout_height="wrap_content"
  168 + android:layout_alignParentRight="true"
  169 + android:background="@drawable/green_raduis_bg"
  170 + android:paddingLeft="10dp"
  171 + android:paddingTop="7dp"
  172 + android:paddingRight="10dp"
  173 + android:paddingBottom="7dp"
  174 + android:text="@string/delete"
  175 + android:textColor="#36C28D"
  176 + android:textSize="12sp" />
  177 + </LinearLayout>
158 </RelativeLayout> 178 </RelativeLayout>
159 </layout> 179 </layout>
moudle_pedometer/src/main/res/values/strings.xml
@@ -68,7 +68,7 @@ @@ -68,7 +68,7 @@
68 <string name="loc_gps_accuracy_mid">GPS信号质量中等</string> 68 <string name="loc_gps_accuracy_mid">GPS信号质量中等</string>
69 <string name="loc_gps_accuracy_good">GPS信号质量好</string> 69 <string name="loc_gps_accuracy_good">GPS信号质量好</string>
70 <string name="layout_street_active_type">活动类型</string> 70 <string name="layout_street_active_type">活动类型</string>
71 - <string name="open_gps_tip">请开启GPS将其设置为高精度模式!</string> 71 + <string name="open_gps_tip">请开启GPS,将其设置为高精度模式!</string>
72 <!----> 72 <!---->
73 <!--网络请求--> 73 <!--网络请求-->
74 <string name="retry">重试</string> 74 <string name="retry">重试</string>
@@ -78,10 +78,11 @@ @@ -78,10 +78,11 @@
78 <string name="finish">完成</string> 78 <string name="finish">完成</string>
79 <string name="no_finish">未完成</string> 79 <string name="no_finish">未完成</string>
80 <string name="again_up">重新上传</string> 80 <string name="again_up">重新上传</string>
  81 + <string name="delete">删 除</string>
81 <string name="myrecord">我的记录</string> 82 <string name="myrecord">我的记录</string>
82 <string name="up_fail">上传失败</string> 83 <string name="up_fail">上传失败</string>
83 <string name="enter_range_tip">您已回归轨迹继续参与运动吧</string> 84 <string name="enter_range_tip">您已回归轨迹继续参与运动吧</string>
84 - <string name="exit_range_tip">您已偏离路径轨迹请您时回归路径</string> 85 + <string name="exit_range_tip">您已偏离路径轨迹请您时回归路径</string>
85 <string name="more_than_pause_count_tip">您已超过最大暂停次数,无法继续比赛</string> 86 <string name="more_than_pause_count_tip">您已超过最大暂停次数,无法继续比赛</string>
86 <string name="run_pause_tip">固定赛事只可暂停一次\n是否确定使用?</string> 87 <string name="run_pause_tip">固定赛事只可暂停一次\n是否确定使用?</string>
87 <string name="add_path">添加轨迹</string> 88 <string name="add_path">添加轨迹</string>