-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recurring notification triggers #8
Comments
I actually tried to create a shim for delayed and recurring notification triggers. Here is how I did this: A dedicated web worker runs the This works perfectly on the Chrome desktop browser with the installed PWA running in a tab without focus and with DevTools closed, as this influences sleeping behaviour. Timers with 30 minute or longer intervals are no problem at all. Unfortunately, this does not work with the Chrome browser for Android. The dedicated web worker gets put to sleep shortly after (about 5 minutes) moving the PWA to the background. My questions are:
|
The Google Firestore team also seems to have issues with the lack of persistence in web workers. It really looks like corporate Google engineers of different Google divisions are waging similar battles against a common problem. |
The need for recurring triggers was clearly voiced in the feedback of the Chrome M80-M83 Origin Trial. I would like to echo this pressing need by presenting the following humanitarian use case.
As an international nonprofit organisation, we are currently developing a progressive web application (PWA) for researching the aetiology (origin) of a number of medical conditions in the setting of clinical trials.
Indefinitely recurring notification triggers would allow to remind patients to take their medicine or to fill in a form at specific times of the day.
The preceding notification(s) would be cleared prior to showing the new notification.
As this application is not intended for a general audience, it cannot be offered as a native app in the Google Play Store. Whereas to keep the barriers to installation low, we went for a PWA. A low barrier to unassisted installation is especially important right now during the ongoing SARS-CoV-2 pandemic, where interaction with patients and their smartphones or tablets should be kept to an absolute minimum. Nonetheless, non-COVID patients and their needs should not be left unattended during the current crisis.
For your information, there exists also a 2018 StackExchange question about this topic, which I recently answered to the best of my knowledge.
Slightly related, Manifest V3 for Chrome Extensions has a
chrome.alarms
API for service workers, as explained here. Obviously, this is of no use to the Android Chrome browser, but perhaps some ideas may be borrowed.The text was updated successfully, but these errors were encountered: