You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When users aren't actively connected to your application, push notifications ensure they still receive important alerts. Push notifications are delivered through platform-specific services (APNs for iOS, FCM for Android, Web Push for browsers) and can reach users even when your app isn't running.
415
+
The publishing examples shown earlier include `extras.push` fields that automatically deliver push notifications to offline users. For this to work, client devices must be activated for push notifications, and you need to configure your push credentials (APNs, FCM, or Web Push) in your Ably dashboard.
416
416
417
-
### Push notifications
418
-
419
-
Push notifications are the primary mechanism for delivering notifications to offline or inactive users. Ably provides a unified API for sending push notifications across all platforms, abstracting away the complexity of managing separate integrations with APNs, FCM, and Web Push.
420
-
421
-
#### Delivery approaches
422
-
423
-
Ably supports two delivery models for push notifications, each suited to different use cases:
424
-
425
-
* Direct publishing sends notifications directly to specific users or devices using `clientId` or `deviceId`, targeting individual recipients without requiring channel subscriptions. This works best for transactional notifications like order confirmations, account alerts, or direct messages.
426
-
* Channel-based publishing publishes notifications to channels where users have subscribed their devices. This is ideal for topic-based notifications like news categories, sports scores, or group messages. Channel-based delivery provides approximately 50% cost savings compared to direct publishing when sending the same notification to many users.
427
-
428
-
Most applications use both approaches: channel-based publishing for optional notification categories users can subscribe to, and direct publishing for critical user-specific alerts. See the [direct publishing documentation](/docs/push/publish#direct-publishing) and [channel-based publishing documentation](/docs/push/publish#via-channels) for implementation details.
429
-
430
-
#### Device activation
417
+
### Device activation
431
418
432
419
Before devices can receive push notifications, they must be activated with Ably. Ably supports both [client-side activation](/docs/push/configure/device#client-side-activation) (where the device registers itself) and [server-side activation](/docs/push/configure/device#server-side-activation) (where your backend manages registration). Client-side activation is simpler and suitable for most use cases, while server-side activation provides more control and is useful when migrating from other push providers or when using FCM for all platforms.
433
420
434
-
#### Multi-platform considerations
435
-
436
-
Each platform has different capabilities and payload formats. Ably provides a [unified payload structure](/docs/push/publish#payload) that works across all platforms, with support for [platform-specific overrides](/docs/push/publish#platform-specific-payloads) when you need to use features unique to iOS, Android, or web.
437
-
438
-
For a comprehensive guide to implementing push notifications at scale, including device management, channel design, security considerations, and delivery monitoring, see the [push notifications guide](/docs/guides/pubsub/push-notifications).
421
+
For a comprehensive guide to implementing push notifications at scale, including device management, multi-platform considerations, security, and delivery monitoring, see the [push notifications guide](/docs/guides/pubsub/push-notifications).
0 commit comments