From b3315feab1893d4a15643aea29d04cb72afcea24 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期三, 14 五月 2025 16:37:13 +0800
Subject: [PATCH] 2025年05月14日16:37:10
---
app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java b/app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java
index 7ca79f6..4b2c5cb 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java
@@ -1,6 +1,8 @@
package com.hdl.photovoltaic.ui;
+import android.app.ActivityManager;
+import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
@@ -86,14 +88,15 @@
this.pushTokens();
//鑾峰彇浜戠鑴氭湰
HdlESLocalJsonLogic.getInstance().getAllHdlESLocalJson();
- mForegroundService= new Intent(this, ForeService.class);
- startService();
+// mForegroundService= new Intent(this, ForeService.class);
+// startService();
}
Intent mForegroundService;
- private void startService(){
+
+ private void startService() {
// Android 8.0浣跨敤startForegroundService鍦ㄥ墠鍙板惎鍔ㄦ柊鏈嶅姟
- if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
startForegroundService(mForegroundService);
} else {
startService(mForegroundService);
@@ -246,7 +249,7 @@
// }
if (TextUtils.isEmpty(HDLLinkPMUser.getInstance().getAccessToken())) {
//鍏跺疄鍒锋柊token澶辫触宸查�氱煡閫�鍑虹櫥褰曪紝鏁版嵁宸茬粡娓呯┖锛屽洜涓虹瓑2s uni鍔犺浇鎱㈠鑷磋姹傞摼鎺ョ殑鏃跺�欏嚭鐜皌oken涓虹┖
- HdlLogLogic.print("杩斿洖鍘�");
+ HdlLogLogic.print("杩斿洖鍘�---", true);
return;
}
UserConfigManage.getInstance().setUniBottomSafeDistanceBackgroundColor(0);
@@ -273,7 +276,9 @@
String path = HDLUniMP.UNI_EVENT_OPEN_HOME_DETAILS_C + "?homeId=" + houseIdBean.getHomeId() + "&homeName=" + houseIdBean.getHomeName() + "&powerStationStatus=" + houseIdBean.getPowerStationStatus();
HdlUniLogic.getInstance().openUniMP(path, null);
}
+
}
+
// /**
// * 鐗╃悊鎸夐敭杩斿洖浜嬩欢(鍖呮嫭宸︽粦绉婚櫎浜嬩欢)
@@ -323,7 +328,7 @@
HdlUniLogic.getInstance().checkRemoveOtherUniMPEventCallBack();
//绉婚櫎鐩戝惉
HDLLinkLocalSdk.getInstance().removeAllTopicsListener(allTopicsListener);
- stopService(mForegroundService);
+// stopService(mForegroundService);
}
/**
@@ -480,6 +485,14 @@
uniCallBackBaseBean.setType(linkResponse.getTopic());
uniCallBackBaseBean.setData(linkResponse.getData());
HdlUniLogic.getInstance().sendUni(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_MODEL, uniCallBackBaseBean);
+ } else if (linkResponse.getTopic().endsWith("custom/wifi/notify")) {
+ //閫嗗彉鍣ㄨ繛鎺ヨ矾鐢辩姸鎬侀�氱煡
+// HDLUniMP.UniCallBackBaseBean uniCallBackBaseBean = new HDLUniMP.UniCallBackBaseBean();
+// uniCallBackBaseBean.setType(linkResponse.getTopic());
+// uniCallBackBaseBean.setData(linkResponse.getData());
+// HdlUniLogic.getInstance().sendUni(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_MODEL, uniCallBackBaseBean);
+ HdlLogLogic.print(linkResponse.getTopic() + new Gson().toJson(linkResponse.getData()), true);
+ HdlDeviceLogic.getInstance().searchAllNetworkGateway(null);//閫嗗彉鍣╳ifi鐘舵��-閲嶆柊鎼滅储涓�涓嬮�嗗彉鍣�-閲嶆柊鏇存柊杩炴帴鐘舵��
}
}
--
Gitblit v1.8.0