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.
OnTokenReceived(const char *token)=0
virtual void
Called on the client when a registration token arrives.

Public functions

OnMessage

virtual void OnMessage(
  const Message & message
)=0

Called on the client when a message arrives.

Details
Parameters
message
The data describing this message.

OnTokenReceived

virtual void OnTokenReceived(
  const char *token
)=0

Called on the client when a registration token arrives.

This function will eventually be called in response to a call to firebase::messaging::Initialize(...).

Details
Parameters
token
The registration token.

~Listener

virtual  ~Listener()