Configuring Push Notifications and Device Tokens?
Questions:
- How do I register a device to receive push notifications?
- How can users subscribe to specific notification topics?
- What platforms are supported for push delivery?
Description:
The TYRIOS platform uses Firebase to dispatch push notifications directly to user devices. By managing device tokens and subscriptions, administrators and developers can ensure targeted alerts reach the correct audience reliably.
We'll show you, step by step, how to:
-
Register Tokens: Connect device tokens for Web, Android, or iOS platforms.
-
Manage Topics: Group users by subscribing or unsubscribing them from specific broadcast topics.
-
Target Delivery: Send notifications based on user opt-in preferences and active device records.
Solution:
-
Register the Device Token
To send a push alert, the system requires a registered device token. Save the token while specifying the active application code and the platform type, which must be Web, Android, or iOS.
-
Verify Opt-In Preferences
Before a push notification is dispatched, verify that the user is eligible. The system checks the token record to ensure the push preference is enabled.
-
Subscribe to Notification Topics
You can assign users to specific notification groups during the token registration process. The system stores these topic subscriptions as a list, allowing you to broadcast messages to entire segments at once.
-
Dispatch Push Notifications
Once a notification is saved to the database, the system automatically triggers the push delivery. It routes the message through the Firebase integration, targeting either specific device tokens or entire subscribed topics.
-
Process Topic Unsubscriptions
If a user no longer wants updates from a specific group, process an unsubscription request. This removes the specific topic from their stored subscription list without disabling their overall push access.
Tips and Tricks:
Pro-Tips:
-
Anonymous users can still be registered for push notifications as long as their device token is saved.
-
Use topic subscriptions to efficiently send general announcements, such as system warnings or company news, to a wide audience.
Warnings:
-
If a user's push preference is disabled, the system will not send notifications to their device, even if the token is valid.
-
Push notifications will fail if the application code or platform type is missing from the token record.