Triggering Firebase In-App Messaging with Cloud Functions

85 Views Asked by At

I want to trigger Firebase In-App Messaging through Cloud Functions with the goal of showing in-app messages to users based on certain changes to Firestore documents.

I have come across examples for sending push notifications using cloud functions but haven't found specific guidance for sending in-app messages. Is it possible to trigger Firebase In-App Messaging using Cloud Functions?

1

There are 1 best solutions below

0
On

In-app messages are shown while the user is actively using the app. You can only guarantee that is the case from inside the app, so there is no way to trigger in-app messages from outside the app.

If you send a Notification with Firebase Cloud Messaging, that'll display in the device even when the user is not actively using the app.

If you want to control how the message looks, you can send a Data-only message through Firebase Cloud Messaging and control how it is displayed on the device in your onMessageReceived handler.