AirNotifier

Easy to use push notifications for iOS, Android and Windows

View on GitHub

Introduction

AirNotifier is an easy-to-use yet professional application server for sending real-time notifications to mobile and desktop applications. AirNotifier provides an unified web service interface to deliver messages to multi devices using multi protocols, it also features a friendly web based administrator UI to configure and manage services.

Support

If you need help to setup your own or hosted AirNotifier to integrate with moodle®, please click here for commercial support.

Features

  • Multi devices: iOS(APNs), Android(GCM), Windows Phone(WNS/MPNS)
  • Subscribe to multi channels
  • Unlimited number of devices and channels
  • API access control
  • Web-based UI to configure
  • Broadcase notifications
  • Access key management
  • Logging activities
  • Apple Feedback API
  • GCM broadcast API
  • Non-blocking API design allows master provider to handle large loads of request smoothly

Push notification examples

Sending simple notification to iOS devices

POST /api/v2/push HTTP/1.1
X-AN-APP-NAME: moodlemobileapp
X-AN-APP-KEY: b2b56dbb
Content-Type: application/json
{
    "device": "ios",
    "token": "FE66489F304DC75B8D6E8200DFF8A456E8DAEACEC428B427E9518741C92C6660",
    "alert": "Hello from AirNotifier",
    "sound": "Submarine.aiff",
    "badge": 1
}

Sending toast type notification to windows 8.1 devices

POST /api/v2/push HTTP/1.1
X-AN-APP-NAME: moodlemobileapp
X-AN-APP-KEY: b2b56dbb
Content-Type: application/json
{
    "device": "wns",
    "token": "https:\/\/sin.notify.windows.com\/?token=AgYAAACDWksZrGbln5sUbP6D3F%2b9ddjptarcZ%2f9vJsDwCt16EHiupJaRddEXJ8BEfx4SE5slxQlB6iknY7zdUEXFayFclNXCIYp6CWnMTYSHGVRySO7aglj6%2b09wTBYqBFxFuoA%3d",
    "alert": "alert contetnt",
    "wns": {
        "type": "toast",
        "template": "ToastImageAndText01",
        "image": ["image1"],
        "text": ["test1"]
    },
    "extra": {
        "processor":"moodle",
        "data":{"key1":"param1 value","key2":"param2 value"}
    }
}

Installation

Please read Installation guide

Configuration

airnotifier.conf is the config file, options:

  • pemdir: The directory storing certificates
  • passwordsalt: passwordsalt
  • masterdb: MongoDB database name
  • dbprefix: MongoDB collection name prefix, this will be used to create object data collection

Web service documentation

Requirements

Copyright

Copyright (c) Dongsheng Cai and individual contributors

License

(BSD License)

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

* Redistributions of source code must retain the above copyright
  notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
  notice, this list of conditions and the following disclaimer in
  the documentation and/or other materials provided with the
  distribution.
* Neither the name of Dongsheng Cai nor the names of its contributors
  may be used to endorse or promote products derived from this
  software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
DONGSHENG CAI BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.