Giter Club home page Giter Club logo

pushbackend's Introduction

PushBackend - Push Notification Service for Mobile Applications

PushBackend is a PHP Codeigniter and Amazon SNS based mobile push notification project. It is a base service of sending push message to all mobile clients, specific user or topic. It includes base and sample functions, you can add your functions and implement your scenerios.

The project uses Codeigniter, MySQL but you can easily use it without Codeigniter framework.

  • Amazon SNS
  • iOS, Android, Windows Phone and others
  • iOS Development, Distribution management
  • JSON, XML etc. formats supported (Detail: CodeIgniter Rest Server)
  • Topic, User management
  • Send image, sound etc with push message

Version

1.0

Future Tasks

  • Node.js and MongoDB support.
  • iOS and Android Demos
  • Optional push message service. Amazon SNS, GCM, APNS etc.

Tech

PushBackend project is a PHP project. It uses Amazon SNS for push notification service.

The project is developed with Codeigniter but it can be use without framework.

PushBackend uses some open source projects to work properly:

  • AmazonSNS-PHP-API - A lightweight PHP wrapper for the Amazon SNS API
  • CodeIgniter Rest Server - A fully RESTful server implementation for CodeIgniter using one library, one config file and one controller.

Flow of token adding, updating and removing

TokenFlow

Usage

1- Add Access Key, Client Secret, Region to config/site_settings.php. How to get AWS Credentials: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSGettingStartedGuide/AWSCredentials.html

$config['aws_accesskey']        = 'XXXXXXXX';
$config['aws_secretkey']        = 'XXXXXXXX';
$config['aws_region']           = 'eu-west-1';

2- Add your application ARN's to config/site_settings.php. How to get Application ARN from Amazon SNS: http://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-register.html

$config['push_arn_android']     = '';
$config['push_arn_ios_pro']     = '';
$config['push_arn_ios_dev']     = '';

3- Create related tables from push-db.sql

4- Enable authentication and logging from config/rest.php (optional)

5- Adding token (POST method, "iravul/1/setToken")

Parameter Description
user_id user identifier of your project
token Apple device token, GCM token etc.
token_type development, production
device optional
device_id optional for iOS, mandatory for Android
osType ios, android
osVersion optional
app_version optional

6- Removing token (POST method, "iravul/1/removeToken")

Parameter Description
user_id user identifier of your project
token Apple device token, GCM token etc.

7- Send push message (POST method, "iravul/1/push")

Parameter Description
user_id user identifier of your project
message should be max 200 char because of push message packet size limit
type will be used for differentiate push type. you can send general message, image, sound or pool push messages. it will be differed by $type attribute.
type_id you can get push detail with type_id and type values. then you make a request and get data.

License

Copyright 2016 Ergin Kucukiravul

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.

pushbackend's People

Contributors

iravul avatar

Stargazers

 avatar cereal avatar Maduka Jayalath avatar Burak Çolak avatar Murat Yasar avatar

Watchers

James Cloos avatar Burak Çolak avatar

Forkers

seif-abaza

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.