All Projects → pankajsoni19 → fcm-erlang

pankajsoni19 / fcm-erlang

Licence: MIT license
Firebase Cloud Messaging V1 API

Programming Languages

erlang
1774 projects
Makefile
30231 projects

Projects that are alternatives of or similar to fcm-erlang

Server
FerrisChat's Server
Stars: ✭ 21 (+31.25%)
Mutual labels:  messaging
plivo-python
A Python library for communicating with the Plivo API and generating Plivo XML.
Stars: ✭ 57 (+256.25%)
Mutual labels:  messaging
psr-container-messenger
Message bus and queue for Mezzio with Symfony Messenger + Enqueue
Stars: ✭ 24 (+50%)
Mutual labels:  messaging
Whatsapp Android App
This is sample code for layout for chatting app like Whatsapp.
Stars: ✭ 32 (+100%)
Mutual labels:  messaging
SuperSimpleTcp
Simple wrapper for TCP client and server in C# with SSL support
Stars: ✭ 263 (+1543.75%)
Mutual labels:  messaging
sample-spring-cloud-stream
sample microservices communicating asynchronously using spring cloud stream, rabbitmq
Stars: ✭ 22 (+37.5%)
Mutual labels:  messaging
horse-messaging
Open Source Messaging Framework. Queues, Channels, Events, Transactions, Distributed Cache
Stars: ✭ 65 (+306.25%)
Mutual labels:  messaging
ufw
A minimalist framework for rapid server side applications prototyping in C++ with dependency injection support.
Stars: ✭ 19 (+18.75%)
Mutual labels:  messaging
rx-stomp
STOMP adaptor for RxJS
Stars: ✭ 76 (+375%)
Mutual labels:  messaging
text-sdk-php
PHP SDK to send messages with CM.com
Stars: ✭ 18 (+12.5%)
Mutual labels:  messaging
zenoh-c
zenoh client library written in C and targeting micro-controllers.
Stars: ✭ 28 (+75%)
Mutual labels:  messaging
muon-java
Muon Core for the JVM. APIs and Microservices taken to the next level
Stars: ✭ 18 (+12.5%)
Mutual labels:  messaging
rocketmq-site
Apache RocketMQ is a cloud native messaging and streaming platform, making it simple to build event-driven applications.
Stars: ✭ 41 (+156.25%)
Mutual labels:  messaging
amqv7-workshop
No description or website provided.
Stars: ✭ 22 (+37.5%)
Mutual labels:  messaging
awesome-secure-messaging
A curated collection of links for secure messaging.
Stars: ✭ 29 (+81.25%)
Mutual labels:  messaging
prosody-filer
Golang mod_http_upload_external server for Prosody and Ejabberd
Stars: ✭ 41 (+156.25%)
Mutual labels:  messaging
azure-service-bus-go
Golang library for Azure Service Bus -- https://aka.ms/azsb
Stars: ✭ 67 (+318.75%)
Mutual labels:  messaging
azure-event-hubs-java
☁️ Java client library for Azure Event Hubs
Stars: ✭ 49 (+206.25%)
Mutual labels:  messaging
wechit
WeChat in Terminal (微信终端版)
Stars: ✭ 74 (+362.5%)
Mutual labels:  messaging
hydra-hpp
Hydra Hot Potato Player (game)
Stars: ✭ 12 (-25%)
Mutual labels:  messaging

fcm-erlang

This software provides an Erlang client for Firebase Cloud Messaging to enable notifications to

  • Browser
  • Android
  • iOS notifications

Changelog

1.1.0 [ 10 June 2020 ]

  • Added support for firebase http v1 cloud messaging.

1.0.1

  • Remove qdate dependency

1.0.0

  • Initial Release

How to compile:

fcm-erlang uses erlang.mk as make system. To compile

$ make

To generate release

$ make rel

How to use with rebar:

You can use fcm_app as a dependency in your rebar.config:

{deps , [
    {fcm, ".*", {git, "https://github.com/pankajsoni19/fcm-erlang.git", {tag, "1.1.0"}}}
]}.

How to run the application fcm-erlang:

make rel will create a release under _rel/fcm directory.

$ cd _rel/fcm
$ bin/fcm console

Start FCM Service

Two connection types are supported.

  1. start_pool_with_api_key supports legacy api
  2. start_pool_with_json_service_file supports http v1 api

3> fcm:start_pool_with_api_key(foo, "google_console_server_key").
{ok,<0.60.0>}
4> fcm:start_pool_with_json_service_file(bar, "google_service_file_path.json").
{ok,<0.65.0>}

Stop Service

6> fcm:stop(foo).
6> fcm:stop(bar).

How to send a FCM message using from a specific FCM application:

At any time you can send a FCM message to one or more mobile devices by calling:

7> fcm:push(RegisteredName, RegIds, Message, Retry).

Where

* `RegistereName` is the atom used during registration
* `RegId` is Registration Id specified as Erlang binary (e.g., `<<"APA91bHun4MxP5egoKMwt2KZFBaFUH-1RYqx...">>`)
* `RegIds` is a list (max 1000 elements) of `RegId`	* `Message` is an Erlang Map.
* `Retry` is only valid for legacy api.

In order to understand Message payload see Message Syntax. or Refer to HTTP v1

Credits

The project was inspired from pdincau/gcm-erlang. I would like to thank Paolo for the same.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].