|
|
|
@ -111,11 +111,11 @@ class NotificationUtil(var context: Context) {
|
|
|
|
return notificationBuilder
|
|
|
|
return notificationBuilder
|
|
|
|
.setContentTitle(resources.getString(R.string.downloading))
|
|
|
|
.setContentTitle(resources.getString(R.string.downloading))
|
|
|
|
.setOngoing(true)
|
|
|
|
.setOngoing(true)
|
|
|
|
.setSmallIcon(R.drawable.ic_launcher_foreground_large)
|
|
|
|
.setSmallIcon(android.R.drawable.stat_sys_download)
|
|
|
|
.setLargeIcon(
|
|
|
|
.setLargeIcon(
|
|
|
|
BitmapFactory.decodeResource(
|
|
|
|
BitmapFactory.decodeResource(
|
|
|
|
resources,
|
|
|
|
resources,
|
|
|
|
R.drawable.ic_launcher_foreground_large
|
|
|
|
android.R.drawable.stat_sys_download
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
.setPriority(NotificationCompat.PRIORITY_LOW)
|
|
|
|
.setPriority(NotificationCompat.PRIORITY_LOW)
|
|
|
|
@ -384,11 +384,11 @@ class NotificationUtil(var context: Context) {
|
|
|
|
notificationBuilder
|
|
|
|
notificationBuilder
|
|
|
|
.setContentTitle("${res.getString(R.string.failed_download)}: $title")
|
|
|
|
.setContentTitle("${res.getString(R.string.failed_download)}: $title")
|
|
|
|
.setContentText(error)
|
|
|
|
.setContentText(error)
|
|
|
|
.setSmallIcon(R.drawable.ic_launcher_foreground_large)
|
|
|
|
.setSmallIcon(R.drawable.baseline_error_24)
|
|
|
|
.setLargeIcon(
|
|
|
|
.setLargeIcon(
|
|
|
|
BitmapFactory.decodeResource(
|
|
|
|
BitmapFactory.decodeResource(
|
|
|
|
res,
|
|
|
|
res,
|
|
|
|
R.drawable.ic_launcher_foreground_large
|
|
|
|
R.drawable.baseline_error_24
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
.setGroup(DOWNLOAD_ERRORED_NOTIFICATION_ID.toString())
|
|
|
|
.setGroup(DOWNLOAD_ERRORED_NOTIFICATION_ID.toString())
|
|
|
|
@ -410,10 +410,10 @@ class NotificationUtil(var context: Context) {
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
//make summary notification
|
|
|
|
//make summary notification
|
|
|
|
val summaryNotification = getBuilder(DOWNLOAD_WORKER_CHANNEL_ID)
|
|
|
|
val summaryNotification = getBuilder(DOWNLOAD_WORKER_CHANNEL_ID)
|
|
|
|
.setSmallIcon(R.drawable.ic_launcher_foreground_large)
|
|
|
|
.setSmallIcon(R.drawable.baseline_error_24)
|
|
|
|
.setLargeIcon(BitmapFactory.decodeResource(
|
|
|
|
.setLargeIcon(BitmapFactory.decodeResource(
|
|
|
|
res,
|
|
|
|
res,
|
|
|
|
R.drawable.ic_launcher_foreground_large
|
|
|
|
R.drawable.baseline_error_24
|
|
|
|
))
|
|
|
|
))
|
|
|
|
.setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_CHILDREN)
|
|
|
|
.setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_CHILDREN)
|
|
|
|
.setGroup(DOWNLOAD_ERRORED_NOTIFICATION_ID.toString())
|
|
|
|
.setGroup(DOWNLOAD_ERRORED_NOTIFICATION_ID.toString())
|
|
|
|
|