All Projects → pavlospt → MultiGCM

pavlospt / MultiGCM

Licence: Apache-2.0 license
Node.JS module to send GCM Push Notifications for both iOS & Android

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to MultiGCM

Radvpn
Decentralized VPN
Stars: ✭ 993 (+6106.25%)
Mutual labels:  gcm
Django Push Notifications
Send push notifications to mobile devices through GCM or APNS in Django.
Stars: ✭ 1,881 (+11656.25%)
Mutual labels:  gcm
php-gcm-apns
A PHP Library for sending messages to devices (Android & IOS) through GCM and Apns respectively .
Stars: ✭ 13 (-18.75%)
Mutual labels:  gcm
Androidheartbeatfixer
Way to set heartbeat interval and the User receive PushNotifications from GCM. Based on related post in Google Forums about HeartBeat problem.
Stars: ✭ 50 (+212.5%)
Mutual labels:  gcm
Onesignal Ionic Example
Stars: ✭ 89 (+456.25%)
Mutual labels:  gcm
Onesignal Unity Sdk
OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Unity app with OneSignal. https://onesignal.com
Stars: ✭ 161 (+906.25%)
Mutual labels:  gcm
Gaurun
General push notification server in Go
Stars: ✭ 804 (+4925%)
Mutual labels:  gcm
pushex
Push notifications for Elixir
Stars: ✭ 96 (+500%)
Mutual labels:  gcm
Securecompatibleencryptionexamples
A collection of secure encryption examples for encrypting strings and binary data.
Stars: ✭ 116 (+625%)
Mutual labels:  gcm
ejabberd mod gcm
Google Cloud Messaging API for Ejabberd (PUSH Messages)
Stars: ✭ 27 (+68.75%)
Mutual labels:  gcm
Notificationpusher
Standalone PHP library for easy devices notifications push.
Stars: ✭ 1,143 (+7043.75%)
Mutual labels:  gcm
Node Gcm
A NodeJS wrapper library port to send data to Android devices via Google Cloud Messaging
Stars: ✭ 1,286 (+7937.5%)
Mutual labels:  gcm
Onesignal Cordova Sdk
OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Ionic, PhoneGap CLI, PhoneGap Build, Cordova, or Sencha Touch app with OneSignal. Supports Android, iOS, and Amazon's Fire OS platforms. https://onesignal.com
Stars: ✭ 214 (+1237.5%)
Mutual labels:  gcm
Onesignal Gradle Plugin
Use with OneSignal-Android-SDK to help integrate it into your Android Studio or Gradle project. https://onesignal.com
Stars: ✭ 49 (+206.25%)
Mutual labels:  gcm
epns
📱 Erlang Push Notifications. APNS(Apple Push Notifications) and FCM(Firebase Cloud Messaging) Push Notifications
Stars: ✭ 13 (-18.75%)
Mutual labels:  gcm
Pulse
A simple PHP script to send GCM/FCM messages
Stars: ✭ 20 (+25%)
Mutual labels:  gcm
Gocryptfs
Encrypted overlay filesystem written in Go
Stars: ✭ 2,088 (+12950%)
Mutual labels:  gcm
andpush
Android Push Notification in Ruby: The fastest client for FCM (Firebase Cloud Messaging)
Stars: ✭ 83 (+418.75%)
Mutual labels:  gcm
MiMA
Model of an idealized Moist Atmosphere: Intermediate-complexity General Circulation Model with full radiation
Stars: ✭ 28 (+75%)
Mutual labels:  gcm
OneSignal-Ionic-Sample
No description or website provided.
Stars: ✭ 85 (+431.25%)
Mutual labels:  gcm

MultiGCM

Node.JS module to send GCM Push Notifications for both iOS & Android

#Installation

npm install -g multi-gcm (Latest available version 1.0.2)

#How To Use

var gcm = require('multi-gcm');
var MultiGCM = new gcm.MultiGCM('AIza...');

var messageAndroid = new gcm.GCMMessage({
  registration_ids:['your_registration_ids'],
  type: 'device type', //Android or iOS
  data: {
    'Your own payload.'
  }
});

MultiGCM.send(messageAndroid,function(err,response){
    if(err){
        console.error(err);
    }else{
        console.log(response); //Containing the custom result object of this Library
        console.log(response.result); //Containing the JSON object response from GCM
    }
});

#Message Object - Properties registration_ids(array of Strings): Array containing the GCM Tokens to send the notifications.

type: The type of devices (iOS,Android). Needed to make checks on the notification payload properties. (Some properties are required when sending to Android using notification, so it needs to be checked before sending it.)

notification(object): Notification object payload.

data(object): Data object payload.

collapse_key(string): Collapse_key, if not applicable it will not get sent.

dry_run(boolean): Dry_run, if not applicable it will not get sent.

time_to_live(number): Time_to_live, if not applicable it will not get sent.

delay_while_idle(boolean): Delay_while_idle, if not applicable it will not get sent.

priority(number): Priority, if not applicable it will not get sent.

content_available(boolean): Content_available (iOS only). Used in APNS payload to wake the client app.

restricted_package_name(string): Restricted_package_name, if not applicable it will not get sent.

For more information on the properties of notification or the message, visit: GCM Connection Server Reference

#Notification Payload - Properties body(string): Notification body text.

sound(string): By default default is only supported.

title(string): Required when sending a notification to Android devices. (Throws error if not sent, before sending).

icon(string): Required when sending a notification to Android devices. (Throws error if not sent, before sending).On Android: sets value to myicon for drawable resource myicon.png.

#Result Object - Properties code(number): Response status code.

error(string): Human readable error message. If the request was successful it will be null.

result(object): The raw GCM response body.

multicastId(string): The multicast_id of the sent Push Notification.

numOfSuccesses(number): Number of successful deliveries.

numOfFailures(number): Number of failed deliveries.

numOfCanonicalIds(number): Number of canonical ids.

errors(array of objects): Custom error objects containing the error message and the error position from the GCM result. Will be null if there are no errors.

errorPositions(array of numbers): Array containing the error positions. Will be null if there are no errors.

deletablePositions(array of numbers): Array containing positions for deletable GCM tokens, if the error received is NotRegistered. Will be null if there are no errors.

canonicalIdsPositions(array of numbers): Array containing positions of Canonical Ids, if there are any. Will be null if there are no Canonical Ids.

canonicalIds(array of strings): Array containing the Canonical Ids, if there are any. Will be null if there are no Canonical Ids.

messageIds(array of strings): Array containing the Message Ids. Useful to check things with GCM Diagnostics in Play Store.

deletableTokens(array of strings): Array containing the GCM Tokens that you can delete from your server. These GCM Tokens are either derived from Canonical Ids or errors with NotRegistered message.

Credits

Author : Pavlos-Petros Tournaris ([email protected])

Google+ : +Pavlos-Petros Tournaris

Facebook : Pavlos-Petros Tournaris

LinkedIn : Pavlos-Petros Tournaris

(In case you use this in your app let me know to make a list of apps that use it! )

License

Copyright 2015 Pavlos-Petros Tournaris

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
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].