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::PollableListener
Constructors and Destructors |
|
|---|---|
~Listener()
|
Public functions |
|
|---|---|
OnMessage(const Message & message)=0
|
virtual void
Called on the client when a message arrives.
|
OnRegistrationReceived(const char *installationId)
|
virtual void
Called on the client when the current app instance has been successfully registered with FCM.
|
OnTokenReceived(const char *token)
|
virtual void
Called on the client when a registration token arrives. |
OnUnregistrationReceived(const char *installationId)
|
virtual void
Called on the client when the current app instance has been successfully unregistered from FCM via a call to Unregister().
|
Public functions
OnMessage
virtual void OnMessage( const Message & message )=0
Called on the client when a message arrives.
| Details | |||
|---|---|---|---|
| Parameters |
|
OnRegistrationReceived
virtual void OnRegistrationReceived( const char *installationId )
Called on the client when the current app instance has been successfully registered with FCM.
This callback provides the unique Firebase Installation ID (FID), which should be used to target this app instance for direct-send messaging.
| Details | |||
|---|---|---|---|
| Parameters |
|
OnTokenReceived
virtual void OnTokenReceived( const char *token )
Called on the client when a registration token arrives.
This function will eventually be called in response to a call to firebase::messaging::Initialize(...).
Deprecated. Use OnRegistrationReceived(const char*) instead.
| Details | |||
|---|---|---|---|
| Parameters |
|
OnUnregistrationReceived
virtual void OnUnregistrationReceived( const char *installationId )
Called on the client when the current app instance has been successfully unregistered from FCM via a call to Unregister().
| Details | |||
|---|---|---|---|
| Parameters |
|
~Listener
virtual ~Listener()