Push Notifications
Send push notifications via Firebase Cloud Messaging. Set up FCM, create notification channels, build notifications with actions, and handle foreground vs background delivery.
What Are Push Notifications?
Push notifications let your server send messages to users even when the app is not in the foreground. Common uses:
- New message alerts
- Order status updates
- Breaking news
- Reminders and promotions
On Android, Firebase Cloud Messaging (FCM) is the standard push delivery service.
FCM Overview
Firebase Cloud Messaging (FCM) flow:
- App registers with FCM on first launch → receives a device token
- App sends the token to your server
- When you want to push, your server sends a message to FCM
- FCM delivers it to the device
FCM is free, reliable, and works even when the app is killed.