mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
show exceptions thrown at triggering notifications
This commit is contained in:
@@ -58,7 +58,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:5.16.17'
|
implementation 'com.simplemobiletools:commons:5.17.17'
|
||||||
implementation 'joda-time:joda-time:2.10.1'
|
implementation 'joda-time:joda-time:2.10.1'
|
||||||
implementation 'androidx.multidex:multidex:2.0.1'
|
implementation 'androidx.multidex:multidex:2.0.1'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
|
||||||
|
@@ -197,7 +197,11 @@ fun Context.notifyEvent(originalEvent: Event) {
|
|||||||
ensureBackgroundThread {
|
ensureBackgroundThread {
|
||||||
val notification = getNotification(pendingIntent, event, content)
|
val notification = getNotification(pendingIntent, event, content)
|
||||||
val notificationManager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
val notificationManager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||||
|
try {
|
||||||
notificationManager.notify(event.id!!.toInt(), notification)
|
notificationManager.notify(event.id!!.toInt(), notification)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
showErrorToast(e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user