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.
Inheritance
Direct Known Subclasses:firebase::messaging::PollableListenerConstructors and Destructors | |
|---|---|
~Listener() |
Public functions | |
|---|---|
OnMessage(constMessage & message)=0 | virtual voidCalled on the client when a message arrives. |
OnTokenReceived(const char *token)=0 | virtual voidCalled on the client when a registration token arrives. |
Public functions
OnMessage
virtualvoidOnMessage(constMessage&message)=0
Called on the client when a message arrives.
| Details | |||
|---|---|---|---|
| Parameters |
|
OnTokenReceived
virtualvoidOnTokenReceived(constchar*token)=0
Called on the client when a registration token arrives.
This function will eventually be called in response to a call tofirebase::messaging::Initialize(...).
| Details | |||
|---|---|---|---|
| Parameters |
|
~Listener
virtual~Listener()
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-01-23 UTC.