Stay organized with collections
Save and categorize content based on your preferences.
firebase::messaging::Listener
This is an abstract class.
#include <messaging.h>
Base class used to receive messages from Firebase Cloud Messaging.
Summary
You need to override base class methods to handle any events required by the application. Methods are invoked asynchronously and may be invoked on other threads.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-01-23 UTC."],[],[],null,["firebase::messaging::Listener\n\n\n**This is an abstract class.**\n\n\n`#include \u003cmessaging.h\u003e`\n\nBase class used to receive messages from Firebase Cloud Messaging.\n\nSummary\n\nYou need to override base class methods to handle any events required by the application. Methods are invoked asynchronously and may be invoked on other threads.\n\nInheritanceDirect Known Subclasses:[firebase::messaging::PollableListener](/docs/reference/cpp/class/firebase/messaging/pollable-listener)\n\nPublic functions \n\nOnMessage \n\n```c++\nvirtual void OnMessage(\n const Message & message\n)=0\n``` \nCalled on the client when a message arrives.\n\n\u003cbr /\u003e\n\nOnTokenReceived \n\n```c++\nvirtual void OnTokenReceived(\n const char *token\n)=0\n``` \nCalled on the client when a registration token arrives.\n\nThis function will eventually be called in response to a call to [firebase::messaging::Initialize](/docs/reference/cpp/namespace/firebase/messaging#namespacefirebase_1_1messaging_1a5e3bd7545d50f7877ce9f72909718750)(...).\n\n\u003cbr /\u003e\n\n\\~Listener \n\n```c++\nvirtual ~Listener()\n```"]]