com.google.firebase.messaging

Contains public API classes for Firebase Cloud Messaging.

Classes

FirebaseMessaging

Top levelFirebase Cloud Messaging singleton that provides methods for generating tokens and subscribing to topics.

FirebaseMessagingService

Base class for receiving messages from Firebase Cloud Messaging.

RemoteMessage

A remote Firebase Message.

RemoteMessage.Builder

Builder object for constructingRemoteMessage instances.

RemoteMessage.Notification

Remote Firebase notification details.

Exceptions

SendException

Firebase message send exception.

Annotations

RemoteMessage.MessagePriority

Priority of the message

Top-level functions summary

inlineRemoteMessage
remoteMessage(to: String, crossinline init: RemoteMessage.Builder.()->Unit)

Returns aRemoteMessage instance initialized using theinit function.

Extension properties summary

Top-level functions

remoteMessage

inline fun remoteMessage(to: String, crossinline init: RemoteMessage.Builder.()->Unit): RemoteMessage

Returns aRemoteMessage instance initialized using theinit function.

Extension properties

messaging

val Firebase.messagingFirebaseMessaging

Returns theFirebaseMessaging instance of the defaultFirebaseApp.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-21 UTC.