Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably send messages at no cost. Using FCM, you can notify a client app that new email or other data is available to sync. You can send notification messages to drive user re-engagement and retention. For use cases such as instant messaging, a message can transfer a payload of up to 4000 bytes to a client app. iOS+ setup Android setup Web setup Flutter setup C++ setup Unity setup Key capabilitiesSend notification messages or data messages Send notification messages that are displayed to your user. Or send data messages and determine completely what happens in your application code. See . Versatile message targeting Distribute messages to your client app in any of 3 ways—to single devices, to groups of devices, or to devices subscribed to topics. Send messages from client apps Send acknowledgments, chats, and other messages from devices back to your server over FCM’s reliable and battery-efficient connection channel. How does it work?An FCM implementation includes two main components for sending and receiving:
You can send messages via the or the . You can use the Notifications composer for testing and to send marketing or engagement messages using powerful built-in targeting and analytics or custom imported segments. See the architectural overview for more detail and important information about the components of FCM. Implementation pathSet up the FCM SDK Set up Firebase and FCM on your app according to the setup instructions for your platform. Develop your client app Add message handling, topic subscription logic, or other optional features to your client app. During the development, you can easily send test messages from the Notifications composer. Develop your app server Decide whether you want to use the Firebase Admin SDK or the server protocol to create your sending logic—logic to authenticate, build send requests, handle responses, and so on. Then build out the logic in your trusted environment. Next steps
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Last updated 2023-12-26 UTC. [{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }] [{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }] Need to tell us more? Welcome to the Android developer guides. These documents teach you how to build Android apps using APIs in the Android framework and other libraries. If you're brand new to Android and want to jump into code, start with the Build your first Android app tutorial. And check out these other resources to learn Android development:
Otherwise, the following is a small selection of essential developer guides that you should be familiar with. Essential documentationContent and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates. Last updated 2023-06-05 UTC. [{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }] [{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }] |