Compare commits

...

6 Commits

Author SHA1 Message Date
ec274d113e <contacts>APK 15.14.5 release Publish. 2026-01-09 19:54:04 +08:00
c66dbfd2b4 编译参数修复 2026-01-09 19:52:10 +08:00
aa27ffb002 通知模块改造尝试。 2026-01-09 19:49:53 +08:00
2a8404cbbe 通知模块改造尝试。 2026-01-09 19:35:13 +08:00
83b3270ddf <contacts>APK 15.14.4 release Publish. 2026-01-08 17:10:43 +08:00
ac4d34a5f8 更新编译混淆配置文件 2026-01-08 17:08:39 +08:00
2 changed files with 17 additions and 17 deletions

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle
#Wed Jan 07 20:51:46 HKT 2026
stageCount=4
#Fri Jan 09 19:54:04 HKT 2026
stageCount=6
libraryProject=
baseVersion=15.14
publishVersion=15.14.3
publishVersion=15.14.5
buildCount=0
baseBetaVersion=15.14.4
baseBetaVersion=15.14.6

View File

@@ -32,7 +32,7 @@ public class NotificationManagerUtils {
public static final String TAG = "NotificationManagerUtils";
// ********** 新增:通知版本管理常量 **********
/** 通知版本标识(源码标记版本,变更时会清理旧渠道) */
public static final String NOTIFICATION_VERSION = "v1.0.0";
public static final String NOTIFICATION_VERSION = "v1.0.2";
/** SP存储键已保存的通知版本 */
private static final String SP_KEY_NOTIFICATION_VERSION = "sp_key_notification_version";
/** SP文件名 */
@@ -156,10 +156,10 @@ public class NotificationManagerUtils {
* 初始化通知渠道:前台服务渠道(无铃声+无振动)、临时提醒渠道(系统默认铃声+无振动)
*/
private void initNotificationChannels() {
LogUtils.d(TAG, "initNotificationChannels() 方法调用");
LogUtils.d(TAG, "initNotificationChannels() 执行通知渠道初始化");
// API<26 无渠道机制,直接返回
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
LogUtils.d(TAG, "initNotificationChannels() API<26无需创建渠道,直接返回");
LogUtils.d(TAG, "initNotificationChannels() API<26无需创建渠道");
return;
}
// 通知服务为空,避免空指针
@@ -168,38 +168,38 @@ public class NotificationManagerUtils {
return;
}
// 1. 前台服务渠道(低优先级,后台保活无打扰)
// 1. 拨号前台服务渠道(低优先级,后台保活无打扰)
NotificationChannel foregroundChannel = new NotificationChannel(
CHANNEL_ID_FOREGROUND,
"拨号服务保活",
"拨号前台服务",
NotificationManager.IMPORTANCE_LOW
);
foregroundChannel.setDescription("拨号服务后台运行,无声音、无振动");
foregroundChannel.setDescription("拨号前台服务后台运行,无声音、无振动");
foregroundChannel.enableLights(false);
foregroundChannel.enableVibration(false);
foregroundChannel.setSound(null, null);
foregroundChannel.setSound(null, null); // 强制无铃声
foregroundChannel.setShowBadge(false);
foregroundChannel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
LogUtils.d(TAG, "initNotificationChannels() 前台服务渠道配置完成");
LogUtils.d(TAG, "initNotificationChannels() 拨号前台服务渠道配置完成");
// 2. 临时提醒渠道(中优先级,系统默认铃声,无振动)
// 2. 其他临时通知渠道(中优先级,系统默认铃声,无振动)
NotificationChannel temporaryChannel = new NotificationChannel(
CHANNEL_ID_TEMPORARY,
"临时通知提醒",
"临时通知",
NotificationManager.IMPORTANCE_DEFAULT
);
temporaryChannel.setDescription("拨号服务临时通知,系统默认铃声,无振动");
temporaryChannel.setDescription("其他临时通知,系统默认铃声,无振动");
temporaryChannel.enableLights(true);
temporaryChannel.enableVibration(false);
temporaryChannel.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION), Notification.AUDIO_ATTRIBUTES_DEFAULT);
temporaryChannel.setShowBadge(false);
temporaryChannel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);
LogUtils.d(TAG, "initNotificationChannels() 临时提醒渠道配置完成");
LogUtils.d(TAG, "initNotificationChannels() 其他临时通知渠道配置完成");
// 注册渠道到系统
mNotificationManager.createNotificationChannel(foregroundChannel);
mNotificationManager.createNotificationChannel(temporaryChannel);
LogUtils.d(TAG, "initNotificationChannels() 成功:创建前台服务+临时提醒渠道");
LogUtils.d(TAG, "initNotificationChannels() 成功:创建前台服务+其他临时通知渠道");
}
// ================================== 对外核心方法(前台服务通知:启动/更新/取消)=================================