From a91655ae2d34b4c0e43f674125d29b2851d4e7fd Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期五, 05 十二月 2025 11:51:17 +0800
Subject: [PATCH] 2025年12月05日11:47:12 先隐藏掉阿拉伯语言
---
app/src/main/java/com/hdl/photovoltaic/other/HdlPushLogic.java | 49 +++++++++++++------------------------------------
1 files changed, 13 insertions(+), 36 deletions(-)
diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlPushLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlPushLogic.java
index 0643bf0..acef781 100644
--- a/app/src/main/java/com/hdl/photovoltaic/other/HdlPushLogic.java
+++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlPushLogic.java
@@ -66,8 +66,8 @@
json.addProperty("produce", AppConfigManage.isIsOnlineServer());//琛ㄧず鏄惁鏄寮忔湇鍔″櫒
json.addProperty("pushToken", UserConfigManage.getInstance().getPushToken());//App鐨勬帹閫乀oken锛屽湪鏋佸厜涓篟egId
json.addProperty("software", "PHOTOVOLTAIC");//杞欢鏉ユ簮鎶奝HOTOVOLTAIC鏀规垚XENTERRA锛屼篃灏变簯绔鐨勯�氶亾鍙凤紙channel)
- json.addProperty("platform", "ALIYUN_APNS");//闃块噷浜戠殑鐗堟湰鐨刾latform
-// json.addProperty("platform", "FCM");//google鐨勭増鏈殑platform
+// json.addProperty("platform", "ALIYUN_APNS");//闃块噷浜戠殑鐗堟湰鐨刾latform
+ json.addProperty("platform", "FCM");//google鐨勭増鏈殑platform
json.addProperty("language", UserConfigManage.getInstance().getCurrentAppLanguage());//2.0杩藉姞鐨勫瓧娈�
HttpClient.getInstance().requestHttp(requestUrl, json.toString(), new CloudCallBeak<String>() {
@@ -130,52 +130,29 @@
*
* @param context 涓婁笅鏂�
* @param pushMessageInfoBean 鎺ㄩ�佹暟鎹璞″疄浣�
- * @param isOpened true=鐐瑰嚮閫氱煡鏍忓洖璋�,false=鏀跺埌鎺ㄩ�侀�氱煡鍥炶皟;
+ * @param isAppInForeground true琛ㄧず鏄墠鍙帮紝false琛ㄧず鍚庡彴
*/
- public void PushPushCommonData(Context context, PushMessageInfoBean pushMessageInfoBean, boolean isOpened) {
+ public void PushPushCommonData(Context context, PushMessageInfoBean pushMessageInfoBean, boolean isAppInForeground) {
if (UserConfigManage.getInstance().isBAccount()) {
//娣诲姞鎺ㄩ�佹暟鎹埌缂撳瓨鍒楄〃涓�;
// this.addPushDataToMemoryList(pushMessageInfoBean);
- if (isOpened) {
-// //瀹夎鍟嗚烦杞晫闈�
-// Intent intent = new Intent(context, BPowerStationActivity.class);
-// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
-// intent.putExtra("skip", "skip");//閲岄潰鍒ゆ柇鏈夎繖涓爣璇嗗氨璺宠浆鍒版秷鎭腑蹇冪晫闈�
-// context.startActivity(intent);
- } else {
+ if (isAppInForeground) {
//搴旂敤鍦ㄥ墠鍙伴�氱煡鏇存柊浣忓畢娑堟伅鍒楄〃鍗冲彲
BaseEventBus bus = new BaseEventBus();
bus.setTopic(ConstantManage.refresh_message_house);
bus.setType(ConstantManage.refresh_message_house);
- EventBus.getDefault().post(bus);
+ EventBus.getDefault().postSticky(bus);
+ } else {
+ // 瀹夎鍟嗚烦杞晫闈�
+// Intent intent = new Intent(context, BPowerStationActivity.class);
+// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
+// intent.putExtra("skip", "skip");//閲岄潰鍒ゆ柇鏈夎繖涓爣璇嗗氨璺宠浆鍒版秷鎭腑蹇冪晫闈�
+// context.startActivity(intent);
}
} else {
// if (isOpened) {
//浜у搧缁忕悊璇存殏鏃朵笉鍋� 2024骞�03鏈�29鏃�10:34:44
-// boolean existsActivity = AppManagerUtils.getAppManager().existsActivity(MessageCenterListActivity.class);
-// if (existsActivity) {
-// //瀛樺湪鍞竴涓�绉嶅彲鑳藉氨鏄綋鍓嶆椿鍔ㄧ獥鍙e氨鏄畠
-// return;
-// }
-// //璺宠浆C绔秷鎭腑蹇冪晫闈�
-// Intent intent = new Intent(context, MessageCenterListActivity.class);
-// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
-// context.startActivity(intent);
-// //涓嶇瀛樹笉瀛樺湪杩欎簺Activity(鎵惧埌鎵嶇Щ闄�)锛岄兘瑕佸仛杩欎簺鍔ㄤ綔,鏈夊彲鑳藉綋鍓嶇殑娲诲姩绐楀彛鏄叾涓竴涓�
-// AppManagerUtils.getAppManager().finishActivity(AccountAndSecurityActivity.class);
-// AppManagerUtils.getAppManager().finishActivity(AsRegardsActivity.class);
-// AppManagerUtils.getAppManager().finishActivity(BindMailActivity.class);
-// AppManagerUtils.getAppManager().finishActivity(BindPhoneActivity.class);
-// AppManagerUtils.getAppManager().finishActivity(languageSelectionActivity.class);
-// AppManagerUtils.getAppManager().finishActivity(MeChangePasswordActivity.class);
-// AppManagerUtils.getAppManager().finishActivity(PersonalDataActivity.class);
-// AppManagerUtils.getAppManager().finishActivity(SetActivity.class);
-// AppManagerUtils.getAppManager().finishActivity(TemperatureUnitActivity.class);
-// AppManagerUtils.getAppManager().finishActivity(WebActivity.class);
-// //閫氱煡uni绉婚櫎鐣岄潰
-// HDLUniMP.UniCallBackBaseBean uniCallBackBaseBean = new HDLUniMP.UniCallBackBaseBean();
-// uniCallBackBaseBean.setType(HDLUniMP.UNI_EVENT_NOTIFICATION_REMOVE_VIEW);
-// HdlUniLogic.getInstance().sendUni(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_MODEL, uniCallBackBaseBean);
+
// }
}
}
--
Gitblit v1.8.0