Push with Cloud Messaging
Send and receive FCM notifications.
What Is Cloud Messaging?
Firebase Cloud Messaging (FCM) delivers push notifications and data messages to your app — even when it's closed.
The flow is simple:
- Each app install gets a unique registration token.
- Your server (or the Firebase console) sends a message to that token (or to a topic).
- FCM routes it to the device, which shows or handles it.
Add the Messaging Dependency
FCM ships in the firebase-messaging library, versioned by the BoM you set up earlier.
No version number is needed when the BoM is present.
// app/build.gradle.kts
dependencies {
implementation(platform("com.google.firebase:firebase-bom:33.1.0"))
implementation("com.google.firebase:firebase-messaging")
}All lessons in this course
- Setting Up Firebase
- Firebase Authentication
- Cloud Firestore Basics
- Push with Cloud Messaging