Skip to content

Commit 0a5039c

Browse files
chore(update-plugins): Wed Jul 19 08:05:20 UTC 2023
1 parent 67762fe commit 0a5039c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/firebase-messaging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ firebase().messaging().showNotificationsWhenInForeground = true
188188

189189
#### Listen to notification messages in the foreground
190190

191-
Since notification messages are displayed automatically(see [Notifications messages delivery and app state](#notifications-messages-delivery-and-app-state)) when the app is in the foreground, sometimes you may want to handle the display of the message manually. To listen to a message in the foreground and handle their display manually, call the [onMessage](#onmessage) method on the instance of [Messaging class](#messaging-class). Code executed via this handler can interact with your application (e.g. updating the state or UI).
191+
Since notification messages are displayed automatically(see [Notifications messages delivery and app state](#notifications-messages-delivery-and-app-state)) when the app is in the background, sometimes you may want to handle the display of the message manually. To listen to a message being received when the app is in the foreground or manually handle the display of the message when the app is in the background, pass a callback function to the [onMessage](#onmessage) method of the instance of [Messaging class](#messaging-class). The callback will. Code executed via this handler can interact with your application (e.g. updating the state or UI).
192192

193193
For example, you could display a new Alert each time a message is delivered:
194194

0 commit comments

Comments
 (0)