@@ -48,7 +48,7 @@ private WfcNotificationManager() {
4848
4949 private static WfcNotificationManager notificationManager ;
5050 // 小米系统上,允许推送时,默认还是没有铃声的。将 wfcChannelId 设置为接入推送时,在小米后台申请的 channelId,可以保证铃声生效
51- private static final String wfcChannelId = "wfc_notification" ;
51+ private static final String wfcNotificationChannelId = "wfc_notification" ;
5252
5353 private final List <Long > notificationMessages = new ArrayList <>();
5454 private int friendRequestNotificationId = 10000 ;
@@ -70,7 +70,7 @@ private void showNotification(Context context, String tag, int id, String title,
7070 NotificationManager notificationManager = (NotificationManager ) context .getSystemService (Context .NOTIFICATION_SERVICE );
7171 Uri notificationRingUri = Uri .parse ("android.resource://" + context .getPackageName () + "/" + R .raw .receive_msg_notification );
7272 if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .O ) {
73- NotificationChannel channel = new NotificationChannel (wfcChannelId ,
73+ NotificationChannel channel = new NotificationChannel (wfcNotificationChannelId ,
7474 "野火IM 消息通知" ,
7575 NotificationManager .IMPORTANCE_HIGH );
7676
@@ -89,7 +89,7 @@ private void showNotification(Context context, String tag, int id, String title,
8989 }
9090
9191
92- NotificationCompat .Builder builder = new NotificationCompat .Builder (context , channelId )
92+ NotificationCompat .Builder builder = new NotificationCompat .Builder (context , wfcNotificationChannelId )
9393 .setSmallIcon (R .mipmap .ic_launcher_notification )
9494 .setAutoCancel (true )
9595 .setCategory (CATEGORY_MESSAGE )
0 commit comments