Skip to content

Latest commit

 

History

History
98 lines (56 loc) · 2.76 KB

messaging.md

File metadata and controls

98 lines (56 loc) · 2.76 KB

Messaging

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. Should be places in main loop function.

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).