Fix notification wake screen on
This commit is contained in:
@@ -568,6 +568,7 @@ class AudioPlayService : BaseService(),
|
|||||||
.setSmallIcon(R.drawable.ic_volume_up)
|
.setSmallIcon(R.drawable.ic_volume_up)
|
||||||
.setSubText(getString(R.string.audio))
|
.setSubText(getString(R.string.audio))
|
||||||
.setOngoing(true)
|
.setOngoing(true)
|
||||||
|
.setOnlyAlertOnce(true)
|
||||||
.setContentTitle(nTitle)
|
.setContentTitle(nTitle)
|
||||||
.setContentText(nSubtitle)
|
.setContentText(nSubtitle)
|
||||||
.setContentIntent(
|
.setContentIntent(
|
||||||
|
|||||||
@@ -551,6 +551,7 @@ abstract class BaseReadAloudService : BaseService(),
|
|||||||
.setSmallIcon(R.drawable.ic_volume_up)
|
.setSmallIcon(R.drawable.ic_volume_up)
|
||||||
.setSubText(getString(R.string.read_aloud))
|
.setSubText(getString(R.string.read_aloud))
|
||||||
.setOngoing(true)
|
.setOngoing(true)
|
||||||
|
.setOnlyAlertOnce(true)
|
||||||
.setContentTitle(nTitle)
|
.setContentTitle(nTitle)
|
||||||
.setContentText(nSubtitle)
|
.setContentText(nSubtitle)
|
||||||
.setContentIntent(
|
.setContentIntent(
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ class CacheBookService : BaseService() {
|
|||||||
val builder = NotificationCompat.Builder(this, AppConst.channelIdDownload)
|
val builder = NotificationCompat.Builder(this, AppConst.channelIdDownload)
|
||||||
.setSmallIcon(R.drawable.ic_download)
|
.setSmallIcon(R.drawable.ic_download)
|
||||||
.setOngoing(true)
|
.setOngoing(true)
|
||||||
|
.setOnlyAlertOnce(true)
|
||||||
.setContentTitle(getString(R.string.offline_cache))
|
.setContentTitle(getString(R.string.offline_cache))
|
||||||
.setContentIntent(activityPendingIntent<CacheActivity>("cacheActivity"))
|
.setContentIntent(activityPendingIntent<CacheActivity>("cacheActivity"))
|
||||||
builder.addAction(
|
builder.addAction(
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ class CheckSourceService : BaseService() {
|
|||||||
NotificationCompat.Builder(this, AppConst.channelIdReadAloud)
|
NotificationCompat.Builder(this, AppConst.channelIdReadAloud)
|
||||||
.setSmallIcon(R.drawable.ic_network_check)
|
.setSmallIcon(R.drawable.ic_network_check)
|
||||||
.setOngoing(true)
|
.setOngoing(true)
|
||||||
|
.setOnlyAlertOnce(true)
|
||||||
.setContentTitle(getString(R.string.check_book_source))
|
.setContentTitle(getString(R.string.check_book_source))
|
||||||
.setContentIntent(
|
.setContentIntent(
|
||||||
activityPendingIntent<BookSourceActivity>("activity")
|
activityPendingIntent<BookSourceActivity>("activity")
|
||||||
|
|||||||
@@ -249,6 +249,7 @@ class DownloadService : BaseService() {
|
|||||||
.setSmallIcon(R.drawable.ic_download)
|
.setSmallIcon(R.drawable.ic_download)
|
||||||
.setSubText(getString(R.string.action_download))
|
.setSubText(getString(R.string.action_download))
|
||||||
.setContentTitle(content)
|
.setContentTitle(content)
|
||||||
|
.setOnlyAlertOnce(true)
|
||||||
.setContentIntent(
|
.setContentIntent(
|
||||||
servicePendingIntent<DownloadService>(IntentAction.play, downloadId.toInt()) {
|
servicePendingIntent<DownloadService>(IntentAction.play, downloadId.toInt()) {
|
||||||
putExtra("downloadId", downloadId)
|
putExtra("downloadId", downloadId)
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ class ExportBookService : BaseService() {
|
|||||||
.setContentText(notificationContentText)
|
.setContentText(notificationContentText)
|
||||||
.setDeleteIntent(servicePendingIntent<ExportBookService>(IntentAction.stop))
|
.setDeleteIntent(servicePendingIntent<ExportBookService>(IntentAction.stop))
|
||||||
.setGroup(groupKey)
|
.setGroup(groupKey)
|
||||||
|
.setOnlyAlertOnce(true)
|
||||||
if (!finish) {
|
if (!finish) {
|
||||||
notification.setOngoing(true)
|
notification.setOngoing(true)
|
||||||
notification.addAction(
|
notification.addAction(
|
||||||
|
|||||||
Reference in New Issue
Block a user