mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-06 11:28:22 +00:00
Set relay status notification to lowest priority
Use IMPORTANCE_MIN on the status channel and PRIORITY_MIN on the notification so it never wakes the device or shows a heads-up banner. Reverts the previous group change so the notification remains separate from the foreground service notification. https://claude.ai/code/session_01Dpu8Jfrozwp3Mpp8U6yQHy
This commit is contained in:
@@ -81,7 +81,7 @@ class AmberRelayStats(
|
||||
.setName(appContext.getString(R.string.status))
|
||||
.setDescription(appContext.getString(R.string.status_service_description))
|
||||
.build()
|
||||
statusChannel = NotificationChannelCompat.Builder(statusId, NotificationManager.IMPORTANCE_LOW)
|
||||
statusChannel = NotificationChannelCompat.Builder(statusId, NotificationManager.IMPORTANCE_MIN)
|
||||
.setName(appContext.getString(R.string.status))
|
||||
.setDescription(appContext.getString(R.string.status_service_description))
|
||||
.setSound(null, null)
|
||||
@@ -197,7 +197,7 @@ class AmberRelayStats(
|
||||
|
||||
val notificationBuilder =
|
||||
NotificationCompat.Builder(appContext, statusChannel.id)
|
||||
.setGroup(group.id)
|
||||
.setGroup(statusGroup.id)
|
||||
.setContentTitle(appContext.getString(R.string.of_connected_relays, connected.size, available.size))
|
||||
.setStyle(
|
||||
NotificationCompat.BigTextStyle()
|
||||
@@ -205,7 +205,7 @@ class AmberRelayStats(
|
||||
.setBigContentTitle(appContext.getString(R.string.of_connected_relays, connected.size, available.size))
|
||||
.setSummaryText(appContext.getString(R.string.status_detail)),
|
||||
)
|
||||
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
|
||||
.setPriority(NotificationCompat.PRIORITY_MIN)
|
||||
.setSmallIcon(R.drawable.ic_notification)
|
||||
.setContentIntent(contentPendingIntent)
|
||||
.addAction(R.drawable.ic_notification, appContext.getString(R.string.reconnect), reconnectPendingIntent)
|
||||
|
||||
Reference in New Issue
Block a user