Best android open-source packages and libraries.

FCM Push Notification PHP

FCM Push Notification for PHP
Updated 4 years ago

Introduction - FCM Push Notification

INTUZ is presenting an interesting FCM push notification class. Please follow the below steps to integrate this control in your project.



Push notification operations

Send push notification to Android and iOS devices using FCM



Example Usage

Define below constants somewhere in your main configuration parameters file

define("PUSHNOTIFICATION_API_KEY", "Your google account's SERVER key");
define("PUSHNOTIFICATION_URL", "https://fcm.googleapis.com/fcm/send"); // for FCM

Include your notification class

require_once('../notification.class.php');
$push = new notification();

How to use defined instance of notification class


$deviceTokens = array("ABCD", "XYZ" ...... );
$parameters = array(
	"YOUR_KEY" => "YOUR_VALUEs",
	"message" => "relavant message",
	"type" => "notification type",
	"data" => "Other custom data",
);

$push->sendnotification($deviceTokens, $parameters);



Bugs and Feedback

For bugs, questions and discussions please use the Github Issues.



License

The MIT License (MIT)

Copyright (c) 2018 INTUZ

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Tags fcm
Package Tags
fcm