StanfordSpezi / SpeziScheduler

Scheduler Module for the Stanford Spezi Ecosystem
https://swiftpackageindex.com/StanfordSpezi/SpeziScheduler/documentation/
MIT License
3 stars 3 forks source link

Badge Count #23

Open PSchmiedmayer opened 1 year ago

PSchmiedmayer commented 1 year ago

Problem

Applications on iOS can use a badge count to display the number of notifications that are currently requiring user action. This functionality could be added to the Spezi module.

Solution

We propose to add mechanisms to display a badge count in the app reflecting the number of open tasks. Unfortunately, the badge count needs to be defined at the time that the notification is scheduled. As we can only know the current number of uncompleted events based on the latest interaction with the scheduler module and can not plan the badge count ahead.

Therefore, this feature requires rescheduling the notifications when the application is opened/closed or when tasks are changed. Based on these rescheduled notifications, we can predict and set the badge count. It would be good to adapt the badge count calculation dynamically once it is computed, e.g., using a configuration closure.

Code of Conduct