Code Monkey home page Code Monkey logo

ejabberd_mod_gcm's Introduction

mod_gcm

Fork Me Now! Spread the project for great good!

mod_gcm is an ejabberd module to send offline messages as PUSH notifications for Android using Google Cloud Messaging API.

Consider using mod_push which implements XEP-0357 and works with many PUSH services.

This module has nothing to do with XEP-0357.

The main goal of this module is to send all offline messages to the registered (see Usage) clients via Google Cloud Messaging service.

Compilation:

Because of the dependencies such as xml.hrl, logger.hrl, etc it's recommended to compile the module with ejabberd itself: put it in the ejabberd/src directory and run the default compiler.

Configuration:

To let the module work fine with Google APIs, put the lines below in the ejabberd modules section:

mod_gcm:
  gcm_api_key: "Your Google APIs key"

Here you can create your own API key for Google Cloud Messaging (you need the server key). Bear in mind that the feature is highly limited for free users.

Usage (Client to server):

As you may know, Google Cloud Messaging won't work as you expect without the client part.

You won't find the instructions how to create your own Google Cloud Messaging client here. Although, this example should work fine.

You also need to send this stanza to the server over the XMPP connection, to let the server know your client key:

<iq to="YourServer" type="set">
  <register xmlns="https://android.googleapis.com/gcm" >
    <key>API_KEY</key>
  </register>
</iq>

The key is kept in mnesia database and completely belongs to the JabberID which it was sent from.

Compatibility:

The module works fine with Ejabberd 16 and maybe the further versions. For the older ones, checkout the ejabberd14 branch.

ejabberd_mod_gcm's People

Contributors

mrdoctorwho avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.