Comment on page
Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably send messages at no cost.
An example In-app message
Firebase In-App Messaging helps you engage your app's active users by sending them targeted, contextual messages that encourage them to use key app features. For example, you could send an in-app message to get users to subscribe, watch a video, complete a level, or buy an item. You can customize messages as cards, banners, modals, or images, and set up triggers so that they appear exactly when they'd benefit your users most.
To use In-App Messaging, you must first add it's SDK to your Android app (make sure your Firebase project is set up, the steps of which are covered in the first section 11.1 and that your analytics are set up, covered in 11.3!)
// Import the BoM for the Firebase platform
// Declare the dependencies for the In-App Messaging and Analytics libraries
// When using the BoM, you don't specify versions in Firebase library dependencies
To create an In-app message campaign, visit https://console.firebase.google.com/project/_/inappmessaging/ where you can specify how your notification should look like, and who to target based on any created users from Audiences or specific event triggers from setting up your Analytics!
When creating a notification, you can test it by specifying something called the installation ID:
To conserve power, Firebase In-App Messaging only retrieves messages from the server once per day. That can make testing difficult, so the Firebase console allows you to specify a test device that displays messages on demand.
I/FIAM.Headless: Starting InAppMessaging runtime with Installation ID YOUR_INSTALLATION_ID