Push Notification System
Automatic alerts for every scheduled observation
Overview
The push notification system is one of the most valuable features of the application. It alerts you automatically at the exact moment of each scheduled observation, eliminating the need to constantly check the calendar.
Example notification
Observation Moment
Study: Production Line A
Station: CNC Operator - 10:34
How It Works
Notifications combine a server scheduler (Cloud Functions running every minute) with the device's service worker to open the right capture form:
- When the plan is generated, every moment is registered as a pending alert
- The server reviews the plan every minute and sends notifications for the upcoming moments
- The service worker receives them, drops expired alerts or alerts belonging to another session, and keeps any open form
- Tapping a notification opens the capture form for the corresponding study and station
✅ Works with the app closed
Your browser subscribes to the project's Web Push service. When the server sends the alert, the operating system wakes the service worker and shows the notification even if you closed the tab, suspended the phone or are offline. This works on Chrome, Edge, Firefox and Safari 16.4+ with the PWA installed on the home screen.
🛡️ Delivery resilience details
- • Automatic retries: transient failures are retried up to three times within the next three minutes.
- • 30-day expiry: subscriptions expire if they are not renewed, avoiding sends to dormant devices.
- • Retired endpoints: 404 and 410 responses clean up obsolete registrations automatically.
- • Temporary receipts: mark delivered messages so retries do not duplicate them.
Enable Notifications
To receive notifications you must grant permission to the browser:
Steps to enable:
- 1Click the bell icon
In the application header
- 2Accept the browser permission
The browser will show a confirmation dialog
- 3Done!
You will receive notifications for all scheduled observations
Notification Features
At the Exact Moment
Notifications fire exactly at the scheduled time. If an observation is scheduled for 10:34, you will receive the notification at 10:34.
Background Operation
With server-scheduled delivery and the local service worker, alerts are shown even when no tab is open or when the browser itself is closed. The operating system notification service wakes the worker, which displays the alert and, on tap, opens the matching capture form.
- The app tab is in the background
- You're using other applications
- The phone is in sleep mode (screen off)
- The browser is closed (Safari requires the PWA installed on the home screen)
⏱️ Delivery window
The server checks the plan every minute and sends each alert with a three-minute window around the scheduled time. In practice, alerts arrive within a few seconds; in extreme scenarios (device just powered on, unstable connection) they may take the full window. Users who register the observation from another device and then sync again receive the corresponding alert in the next scheduler pass.
Included Information
Each notification shows:
- Title: "Observation Moment" or equivalent
- Study name: For quick identification
- Station to observe: Which station you should record
- Scheduled time: Confirmation of the moment
Direct Action
When tapping the notification:
- The app opens automatically
- You navigate directly to the registration form
- The correct station is pre-selected
- You only have to choose the observed task
Sound and Vibration
Notifications include:
- Alert sound: Distinctive sound so as not to confuse with other notifications
- Vibration: Vibration pattern on mobile devices
The exact behaviour depends on your device's notification settings.
Disable Notifications
You can disable notifications at any time:
- Click the bell icon (now crossed out)
- Notifications will be paused
- You can re-enable them whenever you want
⚠️ Known limitations
- • iOS Safari: PWA notifications require iOS 16.4+ and adding the app to the home screen
- • Do Not Disturb mode: The operating system may silence notifications
- • Battery saver: Some devices limit background notifications
Platform Compatibility
| Platform | Support | Notes |
|---|---|---|
| Chrome (Android) | ✅ Full | Best experience |
| Chrome (Windows/Mac) | ✅ Full | System notifications |
| Firefox | ✅ Full | On all platforms |
| Safari (iOS) | ⚠️ Partial | Requires iOS 16.4+ and installed PWA |
| Safari (Mac) | ✅ Full | From macOS Ventura |
| Edge | ✅ Full | Similar to Chrome |
Troubleshooting
I don't receive notifications
- Verify that notifications are enabled in the app (bell icon)
- Check the browser permissions for this site
- Confirm the device is not in Do Not Disturb mode
- On Android, check the app is not being optimized by battery saver
Notifications arrive late
Some devices delay notifications for background apps. Solution:
- Exclude the app from battery optimization
- Enable "Background data" if available
- Keep the app pinned in recents (don't close it completely)