React Native Firebase
    Preparing search index...

    Functions

    deleteToken

    Removes access to an FCM token previously authorized by its scope. Messages sent by the server to this token will fail.

    experimentalSetDeliveryMetricsExportedToBigQueryEnabled

    Sets whether message delivery metrics are exported to BigQuery is enabled or disabled. The value is false by default. Set this to true to allow exporting of message delivery metrics to BigQuery.

    getAPNSToken

    On iOS, it is possible to get the users APNs token. This may be required if you want to send messages to your iOS devices without using the FCM service.

    getDidOpenSettingsForNotification

    When the app is opened from iOS notifications settings from a quit state, this method will return true or false if the app was opened via another method.

    getInitialNotification

    When a notification from FCM has triggered the application to open from a quit state, this method will return a RemoteMessage containing the notification data, or null if the app was opened via another method.

    getIsHeadless

    Returns whether the root view is headless or not i.e true if the app was launched in the background (for example, by data-only cloud message)

    getMessaging

    Returns a Messaging instance for the given app.

    getToken

    Returns an FCM token for this device. Optionally, you can specify custom options for your own use case.

    hasPermission

    Returns a AuthorizationStatus as to whether the user has messaging permission for this app.

    isAutoInitEnabled

    Returns whether messaging auto initialization is enabled or disabled for the device.

    isDeliveryMetricsExportToBigQueryEnabled

    Returns a boolean whether message delivery metrics are exported to BigQuery.

    isDeviceRegisteredForRemoteMessages

    Returns a boolean value whether the user has registered for remote notifications via registerDeviceForRemoteMessages(). For iOS. Android always returns true.

    isNotificationDelegationEnabled

    Returns a boolean whether message delegation is enabled. Android only, always returns false on iOS

    isSupported

    Checks if all required APIs exist in the browser.

    onDeletedMessages

    Called when the FCM server deletes pending messages.

    onMessage

    When any FCM payload is received, the listener callback is called with a RemoteMessage.

    This subscriber method is only called when the app is active (in the foreground).

    onMessageSent

    When sending a RemoteMessage, this listener is called when the message has been sent to FCM.

    onNotificationOpenedApp

    When the user presses a notification displayed via FCM, this listener will be called if the app has opened from a background state.

    onSendError

    When sending a RemoteMessage, this listener is called when an error is thrown and the message could not be sent.

    onTokenRefresh

    Called when a new registration token is generated for the device. For example, this event can happen when a token expires or when the server invalidates the token.

    This subscriber method is only called when the app is active (in the foreground).

    registerDeviceForRemoteMessages

    On iOS, if your app wants to receive remote messages from FCM (via APNs), you must explicitly register with APNs if auto-registration has been disabled.

    requestPermission

    On iOS, messaging permission must be requested by the current application before messages can be received or sent.

    sendMessage

    Send a new RemoteMessage to the FCM server.

    setAPNSToken

    On iOS, This method is used to set the APNs Token received by the application delegate. Note that the token is expected to be a hexadecimal string, as it is an NSData type in the underlying native firebase SDK, and raw data may only be passed as a string if it is hex encoded. Calling code is responsible for correct encoding, you should verify by comparing the results of getAPNSToken() with your token parameter to make sure they are equivalent.

    setAutoInitEnabled

    Sets whether messaging auto initialization is enabled or disabled for the device.

    setBackgroundMessageHandler

    Set a message handler function which is called when the app is in the background or terminated. In Android, a headless task is created, allowing you to access the React Native environment to perform tasks such as updating local storage, or sending a network request.

    setNotificationDelegationEnabled

    Sets whether message notification delegation is enabled or disabled. The value is false by default. Set this to true to allow delegation of notification to Google Play Services. Note if true message handlers will not function on Android, and it has no effect on iOS

    setOpenSettingsForNotificationsHandler

    Set a handler function which is called when the ${App Name} notifications settings link in iOS settings is clicked.

    subscribeToTopic

    Apps can subscribe to a topic, which allows the FCM server to send targeted messages to only those devices subscribed to that topic.

    unregisterDeviceForRemoteMessages

    Unregisters the app from receiving remote notifications.

    unsubscribeFromTopic

    Unsubscribe the device from a topic.

    Variables

    AuthorizationStatus
    NotificationAndroidPriority
    NotificationAndroidVisibility