Ver Fonte

处理切换finish问题

zhangshenjie há 2 meses atrás
pai
commit
8ef2109ede

+ 10 - 4
BusinessCommon/src/main/java/com/develop/common/utils/TuyaUtilsSo.java

@@ -187,6 +187,8 @@ public class TuyaUtilsSo {
                      *       5 搅碎(Chop) , 6 奶昔(Smoothie),7 称重(Weight) ,8 切丁(Dive), 9 去皮(Peeling) ,10 烧水(Boil_water),11 切丝切片 (Food_processor)
                      *      12 自动清洁(Auto_clean) ,13 预加热 (Preheating) , 14 间接性搅拌 (Intermittent_Stir) 15 警告 (Warning)
                      * */
+
+//                    setDpCurrentActivityFalse();
                     //判断是否称重,用来辨别是否需要上报称重数据
                     if (enumValue == 7) {
                         isWeight = true;
@@ -204,6 +206,7 @@ public class TuyaUtilsSo {
                     }
                     autoMaticType = enumValue;
                     isUser = false;
+
                     //自动程序
                     getModes(enumValue);
                     break;
@@ -276,8 +279,7 @@ public class TuyaUtilsSo {
                     break;
                 case TuyaSoDp.CURRENT_ACTIVITY:
                     //关闭当前页面
-                    ToastUtils.showShort("Tuya CURRENT_ACTIVITY:"+boolValue);
-                    if (boolValue == 1) {
+                    if (enumValue == 1) {
                         autoMaticType = -1;
                         isWeight = false;
                         isUser = false;
@@ -927,9 +929,13 @@ public class TuyaUtilsSo {
     }
 
     public void setDpCurrentActivity() {
-        ToastUtils.showShort("当前页面关闭");
         int time = (int)System.currentTimeMillis();
-        getTuyaApi().send_dp_bool(TuyaSoDp.CURRENT_ACTIVITY,1,time);
+        getTuyaApi().send_dp_enum(TuyaSoDp.CURRENT_ACTIVITY,1,time);
+    }
+
+    public void setDpFalse() {
+        int time = (int)System.currentTimeMillis();
+        getTuyaApi().send_dp_enum(134,0,time);
     }
 
 

+ 2 - 2
libBase/src/main/java/com/develop/base/ext/GlobaExt.kt

@@ -225,9 +225,9 @@ fun getSN(): String {
 //        return "011D10390020123010190001"
 //        return "011A10390020123010190002"
 //        return "011A10390020123010190002"
-//        return  "011D10390020123010190021";
+        return  "011D10390020123010190021";
 //        return  "011D10390020123010190088";
-        return  "011D10390020123010190003"
+//        return  "011D10390020123010190003"
 //        return  "011A10390020123010190188"
 //        return "011A10390020123010190099"
 //        return "011A10390020123010190009"