Get Tray Status
Retrieve current seen status to show/hide notification badges
Mark as Seen
Update tray status when users view their notifications
Cross-Device Sync
Server-managed state ensures consistency across all user sessions
Realtime Events
Understand how events power real-time tray status updates
Key Features
Status Tracking
- Global tray-level seen status - Track whether the entire notification tray has been viewed
- Server-managed timestamps - Reliable
lastTraySeenAt
andlastTrayOccurredAt
tracking - Cross-device consistency - Seen status synchronizes across all user devices
Real-time Updates
- LiveObject observation - Immediate local updates when status changes
- Optimal refresh strategy - Get updated status when returning to app
- Smart polling - Optional background refresh strategies
Status Data Model
The notification tray status contains three key properties:Property | Type | Description |
---|---|---|
isSeen | Boolean | Whether the tray has been seen since the last notification |
lastTraySeenAt | Datetime | Timestamp when the tray was last marked as seen |
lastTrayOccurredAt | Datetime | Timestamp when the most recent notification occurred |
Core SDK Methods
Implementation Workflow
Complete Workflow
Complete Workflow
Typical Implementation Pattern
App Lifecycle Integration
App Lifecycle Integration
Handle App State Changes
Error Handling & Retry
Error Handling & Retry
Robust Error Handling
Refresh Strategies
When to UseBenefits
- App launch and foreground transitions
- User-initiated refresh actions
- Navigation to notification tray
- After marking notifications as seen
- Reduces server load
- Provides up-to-date status when needed
- Better user experience with immediate feedback
- No unnecessary background requests