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
lastTraySeenAtandlastTrayOccurredAttracking - 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:- Properties
- Usage Examples
- State Logic
| 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
- Get Tray Status
- Mark as Seen
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
- On-Demand (Recommended)
- Periodic Refresh
- Smart Refresh
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
Related Documentation
Notification Overview
Complete guide to notification tray implementation
Notification Items
Query and manage individual notification items
Notification Events
Reference for notification event types and triggers
Realtime Events
Learn about event-driven real-time communication