davidsf / cbfirebasecm

Coldbox Module for Firebase Cloud Messaging API V1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CBFirebaseCM

Coldbox Module to communicate with Google Firebase Cloud Messaging using API de Firebase Cloud Messaging V1.

Installation

Add Java Jars to Application.cfc

this.javaSettings = {
	loadPaths: directoryList(
		rootPath &  "modules/cbfirebasecm/lib",
		true,
		"array",
		"*jar"
	),
	loadColdFusionClassPath: true,
	reloadOnChange: false
};

Settings

You need to create a "Service Account" of type Json in the Google Cloud Console of type JSON.

Download the json an setup the path in the authfile setting.

Also, setup the apikey that you have generated.

HOW TO USE IT

You can inject the firebasecmService and send an message to a mobile with the pushid token.

property name="firebasecm" inject="firebaseCloudMessageService@cbfirebasecm";

firebasecm.send('Test', 'Test body', token);

About

Coldbox Module for Firebase Cloud Messaging API V1

License:Apache License 2.0


Languages

Language:ColdFusion 100.0%