ReviewOS

also looking at this

craft-native/craft

feat(android): the notification cancels, and the flashlight pair deferred

#151
Merged chris wants to merge feat/android-notification-cancels into main
6 files +303 -4
packages/android/templates/CraftBridge.kt.templatemodified+4-0
Changes to packages/android/templates/CraftBridge.kt.template
@@ -2414,12 +2414,16 @@ class CraftBridge(
24142414
24152415 @JavascriptInterface
24162416 fun cancelNotification(id: String) {
2417 if (CraftNative.cancelNotification(activity, id)) return
2418
24172419 val notificationManager = activity.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
24182420 notificationManager.cancel(id.hashCode())
24192421 }
24202422
24212423 @JavascriptInterface
24222424 fun cancelAllNotifications() {
2425 if (CraftNative.cancelAllNotifications(activity)) return
2426
24232427 val notificationManager = activity.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
24242428 notificationManager.cancelAll()
24252429 }