Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
FCM se basa en el siguiente conjunto de componentes que compilan, transportan y reciben mensajes:
Herramientas para redactar o compilar solicitudes de mensajes. El Compositor de Notifications proporciona una opción basada en GUI para crear solicitudes de notificación.
Para obtener una automatización completa y compatibilidad con todos los tipos de mensajes, debes crear solicitudes de mensajes en un entorno de servidor de confianza que admita los protocolos del servidor de FCM o del SDK de Firebase Admin.
Este entorno podría ser Cloud Functions para Firebase, App Engine
o tu propio servidor de apps.
El backend de FCM, que (entre otras funciones) acepta solicitudes de mensajes,
realiza una distribución de mensajes a través de temas y genera metadatos de mensajes,
como el ID del mensaje.
Una capa de transporte a nivel de la plataforma, que enruta el mensaje al dispositivo de destino, controla la entrega de mensajes y aplica la configuración específica de la plataforma cuando corresponda. Esta capa de transporte incluye lo siguiente:
Capa de transporte de Android (ATL) para dispositivos Android con los Servicios de Google Play
Servicio de notificaciones push de Apple (APNS) para dispositivos Apple
Protocolo web push para aplicaciones web
El SDK de FCM en el dispositivo del usuario, en el que se muestra la notificación o se maneja el mensaje según el estado de la app en primer plano y en segundo plano y cualquier lógica de aplicación relevante.
Flujo del ciclo de vida
Registra dispositivos para recibir mensajes de FCM. Una instancia de una app cliente se registra para recibir mensajes y obtiene un token de registro que identifica de forma única la instancia de la app.
Envía y recibe mensajes descendentes.
Envía un mensaje. El servidor de apps envía mensajes a la app cliente:
El mensaje se redacta en el Compositor de Notifications o en un entorno de confianza, y se envía una solicitud de mensaje al backend de FCM.
El backend de FCM recibe la solicitud de mensaje, genera un ID de mensaje y otros metadatos, y la envía a la capa de transporte específica de la plataforma.
Cuando el dispositivo está en línea, el mensaje se envía a través de la capa de transporte específica de la plataforma.
En el dispositivo, la app cliente recibe el mensaje o la notificación.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Falta la información que necesito","missingTheInformationINeed","thumb-down"],["Muy complicado o demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Desactualizado","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema con las muestras o los códigos","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-05 (UTC)"],[],[],null,["\u003cbr /\u003e\n\nFCM relies on the following set of components that build, transport, and receive\nmessages:\n\n1. Tooling to compose or build message requests. The Notifications composer\n provides a GUI-based option for creating notification requests.\n For full automation and support for all\n [message types](https://firebase.google.com/docs/cloud-messaging/concept-options#notifications_and_data_messages),\n you must build message requests in a trusted\n [server environment](https://firebase.google.com/docs/cloud-messaging/server)\n that supports the Firebase Admin SDK or the FCM server protocol.\n This environment could be Cloud Functions for Firebase, App Engine,\n or your own app server.\n\n2. The FCM backend, which (among other functions) accepts message requests,\n performs fanout of messages via topics, and generates message metadata such\n as the message ID.\n\n3. A platform-level transport layer, which routes the message to the targeted\n device, handles message delivery, and applies platform-specific\n configuration where appropriate. This transport layer includes:\n\n - Android transport layer (ATL) for Android devices with Google Play services\n - Apple Push Notification service (APNs) for Apple devices\n - Web push protocol for web apps\n\n | **Note:** Platform-level transport layers are outside the core FCM product. FCM messages routed to a platform-level transport layer may be subject to terms specific to that platform rather than FCM's terms of service. Android message routing via ATL falls under the [Google APIs terms of service](https://www.google.com/url?q=https://developers.google.com/terms/&sa=D&ust=1558536676246000&usg=AFQjCNFrlRMLv51d1S9NkWxD0IoYSqJ2Ng).\n4. The FCM SDK on the user's device, where the notification is displayed or\n the message is handled according to the app's foreground/background state\n and any relevant application logic.\n\nLifecycle flow\n\n- **Register devices to receive messages from FCM**. An instance of a client app registers to receive messages, obtaining a registration token that uniquely identifies the app instance.\n- **Send and receive downstream messages** .\n - Send a message. The app server sends messages to the client app:\n 1. The message is composed, either in the Notifications composer or a trusted environment, and a message request is sent to the FCM backend.\n 2. The FCM backend receives the message request, generates a message ID and other metadata, and sends it to the platform specific transport layer.\n 3. When the device is online, the message is sent via the platform-specific transport layer to the device.\n 4. On the device, the client app receives the message or notification."]]