Removes access to an FCM token previously authorized by it's scope. Messages sent by the server to this token will fail.
Optionaloptions: NativeTokenOptionsOptions to override senderId (iOS) and appName (android)
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.
You can safely call this method on Android without platform checks. It's a no-op on Android and will promise resolve
null.
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.
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.
iOS only - 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)
Returns an FCM token for this device. Optionally you can specify a custom options to your own use-case.
Optionaloptions: GetTokenOptions & NativeTokenOptionsOptions composite type with all members of GetTokenOptions and NativeTokenOptions
Returns a AuthorizationStatus as to whether the user has messaging permission for this app.
On Web, checks if all required APIs exist in the browser.
On Android, called when the FCM server deletes pending messages.
Returns an unsubscribe function to stop listening for deleted messages.
Called when the FCM deletes pending messages.
When any FCM payload is received, the listener callback is called with a RemoteMessage.
Returns an unsubscribe function to stop listening for new messages.
This subscriber method is only called when the app is active (in the foreground).
Called with a RemoteMessage when a new FCM payload is received from the server.
On Android, when sending a RemoteMessage, this listener is called when the message has been sent to FCM.
Returns an unsubscribe function to stop listening for sent messages.
Called when the FCM sends the remote message to FCM.
When the user presses a notification displayed via FCM, this listener will be called if the app has opened from a background state.
Called with a RemoteMessage when a notification press opens the application.
When sending a RemoteMessage, this listener is called when an error is thrown and the
message could not be sent.
Returns an unsubscribe function to stop listening for sent errors.
NOTE: Android only
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.
Returns an unsubscribe function to stop listening for token refresh events.
This subscriber method is only called when the app is active (in the foreground).
Called with a FCM token when the token is refreshed.
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.
You can safely call this method on Android without platform checks. It's a no-op on Android and will promise resolve
void.
On iOS, messaging permission must be requested by the current application before messages can be received or sent.
You can safely call this method on Android without platform checks. It's a no-op on Android and will promise resolve
AuthorizationStatus.AUTHORIZED.
Optionalpermissions: IOSPermissionsOn Android, send a new RemoteMessage to the FCM server.
A RemoteMessage interface.
On iOS, This method is used to set the APNs Token received by the application delegate.
You can safely call this method on Android without platform checks. It's a no-op on Android and will promise resolve
null.
a hexadecimal string representing your APNS token
Optionaltype: stringoptional string specifying 'prod', 'sandbox' or 'unknown' token type
Sets whether auto initialization for messaging is enabled or disabled.
A boolean value to enable or disable auto initialization.
Set a message handler function which is called when the app is in the background or terminated.
called with an argument of type messaging.RemoteMessage that must be async and return a Promise
Sets whether message delivery metrics are exported to BigQuery is enabled or disabled.
A boolean value to enable or disable exporting of message delivery metrics to BigQuery.
Sets whether remote notification delegation to Google Play Services is enabled or disabled.
A boolean value to enable or disable remote notification delegation to Google Play Services.
On iOS, set a handler function which is called when the ${App Name} notifications settings
link in iOS settings is clicked.
Apps can subscribe to a topic, which allows the FCM server to send targeted messages to only those devices subscribed to that topic.
The topic name.
On iOS, unregisters the app from receiving remote notifications.
You can safely call this method on Android without platform checks. It's a no-op on Android and will promise resolve
void.
Unsubscribe the device from a topic.
The topic name.
The FirebaseApp this module is associated with
Returns whether messaging auto initialization is enabled or disabled for the device.
Returns whether message delivery metrics are exported to BigQuery.
On iOS, returns a boolean value whether the user has registered for remote notifications via
registerDeviceForRemoteMessages().
You can safely access this property on Android without platform checks. Android returns
trueonly.
Returns whether remote notification delegation to Google Play Services is enabled or disabled.
You can safely access this property on iOS without platform checks. iOS returns
falseonly.
The Firebase Messaging service interface.