Fix notification wake screen on

This commit is contained in:
Horis
2025-01-10 17:29:13 +08:00
parent 38390e8ce6
commit c882265de2
6 changed files with 6 additions and 0 deletions

View File

@@ -568,6 +568,7 @@ class AudioPlayService : BaseService(),
.setSmallIcon(R.drawable.ic_volume_up)
.setSubText(getString(R.string.audio))
.setOngoing(true)
.setOnlyAlertOnce(true)
.setContentTitle(nTitle)
.setContentText(nSubtitle)
.setContentIntent(

View File

@@ -551,6 +551,7 @@ abstract class BaseReadAloudService : BaseService(),
.setSmallIcon(R.drawable.ic_volume_up)
.setSubText(getString(R.string.read_aloud))
.setOngoing(true)
.setOnlyAlertOnce(true)
.setContentTitle(nTitle)
.setContentText(nSubtitle)
.setContentIntent(

View File

@@ -51,6 +51,7 @@ class CacheBookService : BaseService() {
val builder = NotificationCompat.Builder(this, AppConst.channelIdDownload)
.setSmallIcon(R.drawable.ic_download)
.setOngoing(true)
.setOnlyAlertOnce(true)
.setContentTitle(getString(R.string.offline_cache))
.setContentIntent(activityPendingIntent<CacheActivity>("cacheActivity"))
builder.addAction(

View File

@@ -63,6 +63,7 @@ class CheckSourceService : BaseService() {
NotificationCompat.Builder(this, AppConst.channelIdReadAloud)
.setSmallIcon(R.drawable.ic_network_check)
.setOngoing(true)
.setOnlyAlertOnce(true)
.setContentTitle(getString(R.string.check_book_source))
.setContentIntent(
activityPendingIntent<BookSourceActivity>("activity")

View File

@@ -249,6 +249,7 @@ class DownloadService : BaseService() {
.setSmallIcon(R.drawable.ic_download)
.setSubText(getString(R.string.action_download))
.setContentTitle(content)
.setOnlyAlertOnce(true)
.setContentIntent(
servicePendingIntent<DownloadService>(IntentAction.play, downloadId.toInt()) {
putExtra("downloadId", downloadId)

View File

@@ -160,6 +160,7 @@ class ExportBookService : BaseService() {
.setContentText(notificationContentText)
.setDeleteIntent(servicePendingIntent<ExportBookService>(IntentAction.stop))
.setGroup(groupKey)
.setOnlyAlertOnce(true)
if (!finish) {
notification.setOngoing(true)
notification.addAction(