MessagingKt

public final class MessagingKt


Summary

Public fields

final @NonNull FirebaseMessaging

Accessing this object for Kotlin apps has changed; see the migration guide.

Public methods

static final @NonNull RemoteMessage

This method is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration.

Public fields

messaging

public final @NonNull FirebaseMessaging messaging

Accessing this object for Kotlin apps has changed; see the migration guide.

Returns the FirebaseMessaging instance of the default FirebaseApp.

Deprecation Notice: The Kotlin extensions (KTX) APIs have been added to their respective main modules, and the Kotlin extension (KTX) APIs in com.google.firebase.firebase-messaging-ktx are now deprecated. As early as April 2024, we'll no longer release KTX modules. For details, see the FAQ about this initiative.

Public methods

remoteMessage

public static final @NonNull RemoteMessage remoteMessage(
    @NonNull String to,
    @ExtensionFunctionType @NonNull Function1<@NonNull RemoteMessage.BuilderUnit> init
)

Returns a RemoteMessage instance initialized using the init function.

Deprecation Notice: The Kotlin extensions (KTX) APIs have been added to their respective main modules, and the Kotlin extension (KTX) APIs in com.google.firebase.firebase-messaging-ktx are now deprecated. As early as April 2024, we'll no longer release KTX modules. For details, see the FAQ about this initiative.