What is the difference between Firebase Cloud Messaging and Firebase In-App Messaging
Asked Answered
W

2

48

What is the difference between Firebase Cloud Messaging and Firebase In-App Messaging? They both send notifications to your app that something has happened. I took a look at their docs and these are their one-line descriptions:

Firebase Cloud Messaging:

Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably send messages at no cost.

Firebase In-App Messaging:

Engage active app users with contextual messages.

They both send messages to the app. What is the difference between them and when should I use one over another? If I want to send a message to the app that the user has verified his email, which one should I choose?

Widely answered 15/10, 2020 at 10:20 Comment(0)
S
47

Firebase Cloud Messaging sends messages to the app when after it is installed on the user's device. This can happen when the user is actively using the app, but also when they are not using the app. And these messages can either be displayed to the user (in which case they're referred to as notifications), or they can be handled silently.

Firebase In-app Messaging creates configuration data at compile time that it includes in your app. It then monitors the Analytics events while the app runs, to determine when to display a message in the app. So: nothing is sent to the app here, all data is included in the app at build time.

Since your use-case needs to send a message to the app after it's been installed, that would require the use of Firebase Cloud Messaging.

Stesha answered 15/10, 2020 at 13:54 Comment(3)
FCM has two types of messages: notifications and data messages. Notifications are delivered to your application code when the user is actively using the app, and are displayed by the system otherwise. Data messages are always delivered to your application code. See firebase.google.com/docs/cloud-messaging/…Stesha
The services could have changed since this answer was given but In-App messages are not strictly defined upon compilation. You can send new In-App messages to existing users without them having to update the app. I believe the significant difference between services is simply where the message shows up within the device.Catlee
@FrankvanPuffelen Does In-app Messaging automatically displays the message (as you said it monitors analytics to determine when to display a message)?Cauda
D
18

Firebase Cloud Messaging is for sending the usual push notifications for an app appearing on the phone's status bar.

Firebase In-App Messaging is to display messages "in the app" to users who are currently using the app. Another key difference is Firebase Cloud Messaging has length limits but I don't think there are the same limits for Firebase In-App Messaging.

Disentomb answered 27/2, 2021 at 14:30 Comment(2)
Do you mean a Dialog by "display messages in the app"? If yes, then how is this different from displaying that dialog programmatically in the app?Cauda
The in-app-messaging will be driven by firebase (for example, if a user completes a level in your game), while your dialogs are driven by your code.Disentomb

© 2022 - 2024 — McMap. All rights reserved.