Commit b3f3717e80d573076034873514233b9a3796f61f

Authored by YangShuai
1 parent 82781df1

1 卡路里服务增加路径变量

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.9.0", 24 + version: "0.9.1",
25 //Lib库前缀 25 //Lib库前缀
26 packeg : "com.cnlive.module", 26 packeg : "com.cnlive.module",
27 //Lib库名称 27 //Lib库名称
moudle_pedometer/src/main/java/com/cnlive/moudle/calorie/service/CalorieService.java
@@ -63,7 +63,7 @@ import java.util.Date; @@ -63,7 +63,7 @@ import java.util.Date;
63 * @author ShinnyYang 63 * @author ShinnyYang
64 */ 64 */
65 public class CalorieService extends Service implements SensorEventListener { 65 public class CalorieService extends Service implements SensorEventListener {
66 - 66 + public static final String serviceName = "com.cnlive.moudle.calorie.service.CalorieService";
67 private String TAG = "CalorieService"; 67 private String TAG = "CalorieService";
68 /** 68 /**
69 * 通知栏相关 69 * 通知栏相关
@@ -321,12 +321,12 @@ public class CalorieService extends Service implements SensorEventListener { @@ -321,12 +321,12 @@ public class CalorieService extends Service implements SensorEventListener {
321 Log.e(TAG, "calorieEntity: " + calorieEntity); 321 Log.e(TAG, "calorieEntity: " + calorieEntity);
322 if (null == calorieEntity) { 322 if (null == calorieEntity) {
323 CURRENT_STEP = 0; 323 CURRENT_STEP = 0;
324 - calorieEntity=new CalorieEntity(); 324 + calorieEntity = new CalorieEntity();
325 calorieEntity.setUuid(CalorieUtil.getUUID()); 325 calorieEntity.setUuid(CalorieUtil.getUUID());
326 calorieEntity.setCurrentDate(CURRENT_DATE); 326 calorieEntity.setCurrentDate(CURRENT_DATE);
327 calorieEntity.setUserId(userId); 327 calorieEntity.setUserId(userId);
328 - calorieEntity.setStep(CURRENT_STEP+"");  
329 - CalorieUtil.insertData(getApplicationContext(),calorieEntity); 328 + calorieEntity.setStep(CURRENT_STEP + "");
  329 + CalorieUtil.insertData(getApplicationContext(), calorieEntity);
330 } else { 330 } else {
331 if (calorieEntity.getStep() != null && !TextUtils.isEmpty(calorieEntity.getStep())) { 331 if (calorieEntity.getStep() != null && !TextUtils.isEmpty(calorieEntity.getStep())) {
332 CURRENT_STEP = Integer.parseInt(calorieEntity.getStep()); 332 CURRENT_STEP = Integer.parseInt(calorieEntity.getStep());