release V390
authorsnickersun <scy@incartech.cn>
Thu, 2 Apr 2020 09:13:28 +0000 (17:13 +0800)
committersnickersun <scy@incartech.cn>
Thu, 2 Apr 2020 09:13:28 +0000 (17:13 +0800)
在重置计步前,先更新到最新,然后broadcast 给其他应用。

app/release/ICSer_V389_2004011142_release.apk [deleted file]
app/release/ICSer_V390_2004021710_release.apk [new file with mode: 0644]
app/src/main/java/com/enqualcomm/support/CoreService.java
app/src/main/java/com/enqualcomm/support/utils/ContextProxy.java
app/version_code.properties

diff --git a/app/release/ICSer_V389_2004011142_release.apk b/app/release/ICSer_V389_2004011142_release.apk
deleted file mode 100644 (file)
index 7474daf..0000000
Binary files a/app/release/ICSer_V389_2004011142_release.apk and /dev/null differ
diff --git a/app/release/ICSer_V390_2004021710_release.apk b/app/release/ICSer_V390_2004021710_release.apk
new file mode 100644 (file)
index 0000000..a55c22c
Binary files /dev/null and b/app/release/ICSer_V390_2004021710_release.apk differ
index f0a94b9..4fae721 100644 (file)
@@ -20,6 +20,7 @@ import android.util.Log;
 import android.widget.Toast;\r
 \r
 import com.enqualcomm.support.bean.ICLocation;\r
+import com.enqualcomm.support.bean.StepCount;\r
 import com.enqualcomm.support.utils.DeviceInfoUtil;\r
 import com.enqualcomm.support.utils.ServiceUtil;\r
 import com.enqualcomm.support.utils.StorageUtils;\r
@@ -730,6 +731,9 @@ public class CoreService extends Service {
                         }\r
                     } else   if (STEP_COUNT_ALARM_ACTION.equals(paramIntent.getAction())) {\r
                         ICLogger.i("Reset Count At 23:59 ");\r
+                        //update stepCount and broadcast before reset\r
+                        this.locationClient.updateStepCount();\r
+                        runtime.getContextProxy().brodcastResetStepCount(runtime.getTotalStepCount());\r
                         resetStepCount();\r
                         setCleanStepCountAlarm();\r
 \r
index 7c23578..d566d2e 100644 (file)
@@ -280,7 +280,14 @@ public class ContextProxy {
       }\r
     }\r
   }\r
-\r
+  private static final String PED_TOTAL_KEY = "PED_TOTAL";\r
+  private static final String PED_FINISH_ACTION = "com.ic.action.PED_FINISH";\r
+  public void brodcastResetStepCount(int StepCount){\r
+    Intent intent = new Intent();\r
+    intent.putExtra(PED_TOTAL_KEY, StepCount);\r
+    intent.setAction(PED_FINISH_ACTION);\r
+    this.context.sendBroadcast(intent);\r
+  }\r
   public void sendBrodcast(String action,Intent intent){\r
     intent.setAction(action);\r
     this.context.sendBroadcast(intent);\r
index 8ee1985..82b5cee 100644 (file)
@@ -1,2 +1,2 @@
-#Wed Apr 01 11:42:50 CST 2020\r
-VERSION_CODE=389\r
+#Thu Apr 02 17:10:56 CST 2020\r
+VERSION_CODE=390\r