2017 © Pedro PelĂĄez
 

symfony-bundle fcmhttpbundle

A bundle to send notifications to mobile devices through Google FCM with the HTTP protocol

image

digitalap/fcmhttpbundle

A bundle to send notifications to mobile devices through Google FCM with the HTTP protocol

  • Sunday, November 27, 2016
  • by rafaelgfirmino
  • Repository
  • 1 Watchers
  • 0 Stars
  • 305 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 10 % Grown

The README.md

FcmHttpBundle

Firebase Cloud Messaging Bundle of Symfony, (*1)

Installation

By composer

  composer require digitalap/fcmhttpbundle

Enable the Bundle

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new DigitalAp\FcmHttpBundle\FcmHttpBundle(),
        );

        // ...
    }

    // ...
}

Configuration

# app/config/config.yml

fcm_http:
  autentication_api_key: keycode ....

Usage

The notification has multiple properties, see FCM [documentation] (https://firebase.google.com/docs/cloud-messaging/http-server-ref) to view. You'll find everyone at FcmHttpBUndle with their getters and setters., (*2)


//A MESSAGE MAY HAVE A NOTIFICATION OR NO $notification = new Notification('Text','Body'); $notification->enableSound(); //Put that one or more relations_id. Message expects an array as parameter //If it is greater than a thousand relations_ids the bundle will send the messages in a thousand $message = new Message(array( '0' '1' )); //A message may not have a notification or a data, but it must have one of the two. $message->setNotification($notification); $guzzle = $this->get('fcm_http.send')->send($message); // response for server dump(guzzle) //Each index of the array returned by the response means a lot of one thousand messages dump($guzzle[0]->getBody()->getContents());

This bundle uses the Guzzle php library, (*3)


License FcmHttpBundle is licensed under the MIT license, (*4)

The Versions

27/11 2016

dev-master

9999999-dev https://github.com/Rafaelgfirmino/FcmHttpBundle

A bundle to send notifications to mobile devices through Google FCM with the HTTP protocol

  Sources   Download

MIT

The Requires

 

by Rafael Gonçalves Firmino

php bundle cloud symfony google ios android firebase chrome notifications fcm

27/11 2016

1.0.0

1.0.0.0 https://github.com/Rafaelgfirmino/FcmHttpBundle

A bundle to send notifications to mobile devices through Google FCM with the HTTP protocol

  Sources   Download

MIT

The Requires

 

by Rafael Gonçalves Firmino

php bundle cloud symfony google ios android firebase chrome notifications fcm