Events¶
The SDK tells the service what happens to its notifications and to the device, so the dashboard can show more than what was sent. Apps don't call anything for it.
| Event | Android | iOS |
|---|---|---|
received |
When the push arrives | In the notification service extension, if the app has one |
displayed |
When the notification is posted | Shown while the app is open, or found in Notification Center when the app comes to the foreground, or tapped |
suppressed |
Notifications or the channel turned off, or hidden in the foreground | Hidden while the app is open |
opened |
Tapped | Tapped |
dismissed |
Swiped away or cleared | Not reported |
app_opened |
The app comes to the foreground, not when launched in the background | Same |
permission_granted, permission_denied |
The permission changed since the app last looked | Same, plus permission_provisional |
token_refreshed |
The push token changed | Same |
Each event is stored on the device first and sent right away. One that can't be sent, for example offline, is sent later, for up to 30 days; one the device couldn't store is sent once, and lost if that fails. When the service rate limits them, they're kept and sent again once the wait it asked for has passed, though a relaunch can send them sooner, and a notification's events still get one immediate attempt. While a deletion of the user is pending, events wait, and the deletion drops them with the user's data. Sending one twice is harmless.
Limits to know when reading the numbers:
- iOS without an extension reports no
received. - iOS
displayedis missing for a notification shown while the app wasn't running and swiped away before the app next opened: iOS tells no app code about either, and Notification Center no longer has it. - iOS
dismissedisn't reported. iOS only reports a swipe for notifications with a category that asks for it. token_refreshedis reported once the service accepts the update carrying the new token, which the SDK sends after it next reads the token (at launch, in the foreground, or after asking for permission), not when the platform issues it.