Download the PHP package valdeirpsr/firebasemessaging-php without Composer
On this page you can find all versions of the php package valdeirpsr/firebasemessaging-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download valdeirpsr/firebasemessaging-php
More information about valdeirpsr/firebasemessaging-php
Files in valdeirpsr/firebasemessaging-php
Package firebasemessaging-php
Short Description Send messages to mobile devices with Google Firebase.
License GNU GPLv3
Homepage https://github.com/valdeirpsr/FirebaseMessaging-PHP
Informations about the package firebasemessaging-php
ValdeirPsr/FirebaseMessaging-PHP
Send messages to mobile devices with Google Firebase.
Installation
composer require valdeirpsr/firebasemessaging-php
Sending A Basic Notification
Sending A Complete Notification
Set the device that will receive the notification
This parameter specifies the recipient of a message.
The value must be a register token, a notification key or a topic. Do not set this field to send multiple topics, see FirebaseMessaging::setCondition for it.
Set the devices that will receive the notification
This method specifies a list of devices (registration tokens or IDs) that receive a multicast message. It must contain between 1 and 1,000 record tokens.
Set the priority of the notification
By default, messages are sent with normal priority. Normal priority optimizes client application battery consumption and should always be used except when immediate delivery is required. For messages with normal priority, the application can get the message late unspecified.
When a message is sent with high priority, it is sent immediately and the application can trigger a device suspended and open a network connection to your server.
Set a delay for idle devices.
When this parameter is set to true, the message must not be sent to the device is inactive.
Default: false
Sending Data to Device
The key should not be a reserved word ("of" or any word beginning with "google" or "gcm"). Do not use any of the words defined in this table (as collapse_key).
They are recommended values in string types. It is necessary to convert the values to objects or other types without string data (e.g., boolean or integer numbers) to the string.
Configuring Your Notification
Set the title of the notification
Indicates the title of the notification. This field is not visible in mobile phones and iOS tablets, only the iWatch.
Required Android; Optional iOS
Set the message notification
Indicates the body text of the notification.
Optional for Android and iOS
Set the icon in the notification
Indicates the icon in the notification.
It works only on Android (Opcional). The icon should is in res/drawable
Set the sound notification
It indicates a sound to play when the device receives a notification. Compatible with default or file name of a sound feature bundled in the application.
Android sound files should reside in / res / raw / iOS and sound files may be in the main package client application or the Library / Sounds folder application data container. See the developer's library iOS for more information.
Optional for Android and iOS
Set Tag
It indicates whether each notification results in a new entry in the Android notifications tray. If not set, each request will create a new notification. If set and a notification with the same tag is already displayed, the new notice will replace the existing notification in the notifications drawer.
Only for Android (Optional)
Set the icon color
Indicates the color of the icon expressed in #rrggbb format.
Only for Android (Optional)
Associate an action for when the user clicks the notification
Indicates the action associated with a user click on the notification.
If set on iOS, it matches the category in the payload of APNs.
On Android, if this parameter is set, an activity with a corresponding intent filter is initiated when the user clicks the notification.
Optional for Android and iOS
Soon support for XMPP