show exceptions thrown at triggering notifications
This commit is contained in:
parent
111c155ea8
commit
842f054407
|
@ -58,7 +58,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:5.16.17'
|
||||
implementation 'com.simplemobiletools:commons:5.17.17'
|
||||
implementation 'joda-time:joda-time:2.10.1'
|
||||
implementation 'androidx.multidex:multidex:2.0.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
|
||||
|
|
|
@ -197,7 +197,11 @@ fun Context.notifyEvent(originalEvent: Event) {
|
|||
ensureBackgroundThread {
|
||||
val notification = getNotification(pendingIntent, event, content)
|
||||
val notificationManager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||
notificationManager.notify(event.id!!.toInt(), notification)
|
||||
try {
|
||||
notificationManager.notify(event.id!!.toInt(), notification)
|
||||
} catch (e: Exception) {
|
||||
showErrorToast(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue