Introduction
When sending messages to mobile apps using Firebase Cloud Messaging, you can send two types: notification messages and data messages. Notification messages show alerts to users automatically, while data messages carry custom information for the app to handle silently.
When you want to show a simple alert or notification to the user without extra coding.
When you need to send hidden data to the app for processing without disturbing the user.
When you want to customize how the app reacts to a message by handling data yourself.
When you want to update app content silently in the background.
When you want to combine both alert and custom data in one message.