Messaging

February 27, 2025 ยท View on GitHub

Description

Google Cloud Messaging class

class Messaging

Functions

  1. ๐Ÿ”น void resetApp()

Unbind or remove FirebaseApp.

void resetApp()
  1. ๐Ÿ”น void loop()

Perform the async task repeatedly (DEPRECATED).

void loop()
  1. ๐Ÿ”น String send(AsyncClientClass &aClient, const Messages::Parent &parent, const Messages::Message &message)

The Firebase project Id should be only the name without the firebaseio.com.

This function requires ServiceAuth authentication.

Read more details about HTTP v1 API here https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages

String send(AsyncClientClass &aClient, const Messages::Parent &parent, const Messages::Message &message)

Params:

  • aClient - The async client.
  • parent - The Messages::Parent object included project Id in its constructor.
  • message - The Messages::Message object that holds the information to send.

Returns:

  • String - The response payload.
  1. ๐Ÿ”น void send(AsyncClientClass &aClient, const Messages::Parent &parent, const Messages::Message &message, AsyncResult &aResult)

The Firebase project Id should be only the name without the firebaseio.com.

This function requires ServiceAuth authentication.

Read more details about HTTP v1 API here https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages

void send(AsyncClientClass &aClient, const Messages::Parent &parent, const Messages::Message &message, AsyncResult &aResult)

Params:

  • aClient - The async client.
  • parent - The Messages::Parent object included project Id in its constructor.
  • message - The Messages::Message object that holds the information to send.
  • aResult - The async result (AsyncResult).
  1. ๐Ÿ”น void send(AsyncClientClass &aClient, const Messages::Parent &parent, const Messages::Message &message, AsyncResultCallback cb, const String &uid = "")

The Firebase project Id should be only the name without the firebaseio.com.

This function requires ServiceAuth authentication.

Read more details about HTTP v1 API here https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages

void send(AsyncClientClass &aClient, const Messages::Parent &parent, const Messages::Message &message, AsyncResultCallback cb, const String &uid = "")

Params:

  • aClient - The async client.
  • parent - The Messages::Parent object included project Id in its constructor.
  • message - The Messages::Message object that holds the information to send.
  • cb - The async result callback (AsyncResultCallback).
  • uid - The user specified UID of async result (optional).