From 0fd8faf8061369296b4a92b081d83c940dfc233e Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 06 一月 2026 18:24:36 +0800
Subject: [PATCH] 2026年01月06日18:24:23 暂隐藏前台服务

---
 app/src/main/java/com/hdl/photovoltaic/uni/MyForegroundService.java |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/app/src/main/java/com/hdl/photovoltaic/uni/MyForegroundService.java b/app/src/main/java/com/hdl/photovoltaic/uni/MyForegroundService.java
index e010d83..8d6e06a 100644
--- a/app/src/main/java/com/hdl/photovoltaic/uni/MyForegroundService.java
+++ b/app/src/main/java/com/hdl/photovoltaic/uni/MyForegroundService.java
@@ -14,7 +14,6 @@
 import com.hdl.photovoltaic.R;
 
 
-
 public class MyForegroundService extends Service {
     private static final String CHANNEL_ID = "MyForegroundServiceChannel";
     private static final int NOTIFICATION_ID = 1;
@@ -48,9 +47,9 @@
     public int onStartCommand(Intent intent, int flags, int startId) {
         // 鍒涘缓閫氱煡
         Notification notification = new NotificationCompat.Builder(this, CHANNEL_ID)
-                .setContentTitle("")//瀹夸富杩涚▼鏈嶅姟
-                .setContentText("")//姝e湪涓巙ni-app淇濇寔閫氫俊
-                .setSmallIcon(R.drawable.notification_logo)  // 蹇呴』璁剧疆涓�涓浘鏍�
+                .setContentTitle(getString(R.string.maintain_communication))//瀹夸富杩涚▼鏈嶅姟
+                .setContentText(getString(R.string.remain_connected))//姝e湪涓巙ni-app淇濇寔閫氫俊锛屼繚鎸佽繛鎺ヤ腑
+                .setSmallIcon(R.drawable.logo)  // 蹇呴』璁剧疆涓�涓浘鏍�
                 .setPriority(NotificationCompat.PRIORITY_LOW)
 //                .setOngoing(true)   // 璁剧疆閫氱煡涓烘寔缁�氱煡锛屼笉鍙竻闄�
 //                .setAutoCancel(false)  // 鈫� 璁剧疆涓轰笉鍙嚜鍔ㄥ彇娑�

--
Gitblit v1.8.0