FirebaseMessaging

Firebase Cloud Messaging, as the Android SDK's com.google.firebase.messaging.FirebaseMessaging. Receiving messages is platform code on every platform (FirebaseMessagingService on Android).

The JS SDK has no topic subscription (a web client's token is subscribed from a server with the Admin SDK) and no auto-init (a token is only ever generated by getToken): those members do nothing on JS and carry @UnsupportedOnJs, so code compiled for JS gets a warning until it opts in.

Firebase Cloud Messaging, as the Android SDK's com.google.firebase.messaging.FirebaseMessaging. Receiving messages is platform code on every platform (FirebaseMessagingService on Android).

The JS SDK has no topic subscription (a web client's token is subscribed from a server with the Admin SDK) and no auto-init (a token is only ever generated by getToken): those members do nothing on JS and carry @UnsupportedOnJs, so code compiled for JS gets a warning until it opts in.

firebase-java-sdk has no Cloud Messaging: every operation fails with an UnsupportedOperationException.

Types

Link copied to clipboard
actual object Companion
actual object Companion
expect object Companion
actual object Companion
actual object Companion
actual object Companion

Properties

Link copied to clipboard
val ios: FIRMessaging

The underlying Firebase iOS SDK object.

Link copied to clipboard

Whether the registration token is generated automatically at startup, which apps turn off until the user has consented. Always false on JS, where a token is only generated by getToken; setting it does nothing there.

Whether the registration token is generated automatically at startup, which apps turn off until the user has consented. Always false on JS, where a token is only generated by getToken; setting it does nothing there.

Whether the registration token is generated automatically at startup, which apps turn off until the user has consented. Always false on JS, where a token is only generated by getToken; setting it does nothing there.

Always false: the JS SDK only generates a token in getToken. Setting it does nothing.

Kept in memory: there is no registration to initialise on the JVM.

Always false: the JS SDK only generates a token in getToken. Setting it does nothing.

Link copied to clipboard

The underlying Firebase JS SDK object.

The underlying Firebase JS SDK object.

Functions

Link copied to clipboard
actual fun deleteToken(): Task<Nothing?>

Deletes the registration token of this app instance, so it stops receiving messages.

actual fun deleteToken(): Task<Nothing?>

Deletes the registration token of this app instance, so it stops receiving messages.

expect fun deleteToken(): Task<Nothing?>

Deletes the registration token of this app instance, so it stops receiving messages.

actual fun deleteToken(): Task<Nothing?>

Deletes the registration token of this app instance, so it stops receiving messages.

actual fun deleteToken(): Task<Nothing?>

Deletes the registration token of this app instance, so it stops receiving messages.

actual fun deleteToken(): Task<Nothing?>

Deletes the registration token of this app instance, so it stops receiving messages.

Link copied to clipboard

Whether message delivery data is exported to BigQuery. Android only: the Apple and JS SDKs configure the export themselves (the Apple notification service extension), so this is always false there.

Always false: on Apple platforms the notification service extension exports delivery data itself.

Whether message delivery data is exported to BigQuery. Android only: the Apple and JS SDKs configure the export themselves (the Apple notification service extension), so this is always false there.

Always false: the JS SDK exports delivery data through its own configuration.

Whether message delivery data is exported to BigQuery. Android only: the Apple and JS SDKs configure the export themselves (the Apple notification service extension), so this is always false there.

Always false: the JS SDK exports delivery data through its own configuration.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
actual fun getToken(): Task<String>

The registration token of this app instance, requested from the backend if needed.

actual fun getToken(): Task<String>

The registration token of this app instance, requested from the backend if needed.

expect fun getToken(): Task<String>

The registration token of this app instance, requested from the backend if needed.

actual fun getToken(): Task<String>

The registration token of this app instance, requested from the backend if needed.

actual fun getToken(): Task<String>

The registration token of this app instance, requested from the backend if needed.

actual fun getToken(): Task<String>

The registration token of this app instance, requested from the backend if needed.

Link copied to clipboard
open override fun hashCode(): Int
open override fun hashCode(): Int
open override fun hashCode(): Int
Link copied to clipboard

Whether notifications are delegated to Google Play services (an Android feature); always false elsewhere.

Always false: notification delegation is an Android feature.

Whether notifications are delegated to Google Play services (an Android feature); always false elsewhere.

Always false: notification delegation is an Android feature.

Whether notifications are delegated to Google Play services (an Android feature); always false elsewhere.

Always false: notification delegation is an Android feature.

Link copied to clipboard
actual fun register(): Task<Nothing?>

Registers this app instance with FCM by its Firebase installation ID (FID), for direct-send messaging. On Android it needs the firebase_messaging_installation_id_enabled manifest flag. The Apple and JS SDKs have no FID registration: the task fails there.

actual fun register(): Task<Nothing?>

Fails: the iOS SDK has no registration by Firebase installation ID.

expect fun register(): Task<Nothing?>

Registers this app instance with FCM by its Firebase installation ID (FID), for direct-send messaging. On Android it needs the firebase_messaging_installation_id_enabled manifest flag. The Apple and JS SDKs have no FID registration: the task fails there.

actual fun register(): Task<Nothing?>

Fails: the JS SDK has no registration by Firebase installation ID.

actual fun register(): Task<Nothing?>

Registers this app instance with FCM by its Firebase installation ID (FID), for direct-send messaging. On Android it needs the firebase_messaging_installation_id_enabled manifest flag. The Apple and JS SDKs have no FID registration: the task fails there.

actual fun register(): Task<Nothing?>

Fails: the JS SDK has no registration by Firebase installation ID.

Link copied to clipboard

Exports message delivery data to BigQuery (Android only); does nothing elsewhere, see deliveryMetricsExportToBigQueryEnabled.

Does nothing: on Apple platforms the notification service extension exports delivery data itself.

Exports message delivery data to BigQuery (Android only); does nothing elsewhere, see deliveryMetricsExportToBigQueryEnabled.

Does nothing: the JS SDK exports delivery data through its own configuration.

Exports message delivery data to BigQuery (Android only); does nothing elsewhere, see deliveryMetricsExportToBigQueryEnabled.

Does nothing: the JS SDK exports delivery data through its own configuration.

Link copied to clipboard

Delegates notifications to Google Play services (an Android feature); does nothing elsewhere.

Does nothing: notification delegation is an Android feature.

Delegates notifications to Google Play services (an Android feature); does nothing elsewhere.

Does nothing: notification delegation is an Android feature.

Delegates notifications to Google Play services (an Android feature); does nothing elsewhere.

Does nothing: notification delegation is an Android feature.

Link copied to clipboard
actual fun subscribeToTopic(topic: String): Task<Nothing?>

Subscribes this app instance to topic. A no-op on JS, whose SDK has no client-side topic subscription.

actual fun subscribeToTopic(topic: String): Task<Nothing?>

Subscribes this app instance to topic. A no-op on JS, whose SDK has no client-side topic subscription.

expect fun subscribeToTopic(topic: String): Task<Nothing?>

Subscribes this app instance to topic. A no-op on JS, whose SDK has no client-side topic subscription.

actual fun subscribeToTopic(topic: String): Task<Nothing?>

A no-op: the JS SDK has no client-side topic subscription (a web token is subscribed from a server with the Admin SDK).

actual fun subscribeToTopic(topic: String): Task<Nothing?>

Subscribes this app instance to topic. A no-op on JS, whose SDK has no client-side topic subscription.

actual fun subscribeToTopic(topic: String): Task<Nothing?>

A no-op: the JS SDK has no client-side topic subscription (a web token is subscribed from a server with the Admin SDK).

Link copied to clipboard
open override fun toString(): String
open override fun toString(): String
open override fun toString(): String
open override fun toString(): String
Link copied to clipboard
actual fun unregister(): Task<Nothing?>

Unregisters this app instance from FCM's FID registration, see register; the task fails on Apple and JS.

actual fun unregister(): Task<Nothing?>

Fails: the iOS SDK has no registration by Firebase installation ID.

expect fun unregister(): Task<Nothing?>

Unregisters this app instance from FCM's FID registration, see register; the task fails on Apple and JS.

actual fun unregister(): Task<Nothing?>

Fails: the JS SDK has no registration by Firebase installation ID.

actual fun unregister(): Task<Nothing?>

Unregisters this app instance from FCM's FID registration, see register; the task fails on Apple and JS.

actual fun unregister(): Task<Nothing?>

Fails: the JS SDK has no registration by Firebase installation ID.

Link copied to clipboard
actual fun unsubscribeFromTopic(topic: String): Task<Nothing?>

Unsubscribes this app instance from topic. A no-op on JS, whose SDK has no client-side topic subscription.

actual fun unsubscribeFromTopic(topic: String): Task<Nothing?>

Unsubscribes this app instance from topic. A no-op on JS, whose SDK has no client-side topic subscription.

expect fun unsubscribeFromTopic(topic: String): Task<Nothing?>

Unsubscribes this app instance from topic. A no-op on JS, whose SDK has no client-side topic subscription.

actual fun unsubscribeFromTopic(topic: String): Task<Nothing?>

A no-op: the JS SDK has no client-side topic subscription (a web token is subscribed from a server with the Admin SDK).

actual fun unsubscribeFromTopic(topic: String): Task<Nothing?>

Unsubscribes this app instance from topic. A no-op on JS, whose SDK has no client-side topic subscription.

actual fun unsubscribeFromTopic(topic: String): Task<Nothing?>

A no-op: the JS SDK has no client-side topic subscription (a web token is subscribed from a server with the Admin SDK).