angular-phonegap-push-notification

AngularJS module for Android and iOS push notification services

Angular Core Dependency: ~1.2.22

Module License: MIT

Added by: Sam Deering

GitHub

Repository

patrickheneise/angular-phonegap-push-notification

Stats

Stars: 74

Watchers: 74

Forks: 16

Module Description

AngularJS Phonegap/Cordova Push Notifications

Bower component for iOS and Android Push Notifcation services. Check out node-apn and node-gcmhttps://github.com/ToothlessGear/node-gcm) to implement push notification services on a node.js server.

Usage

  1. bower install angular-phonegap-push-notification
  2. Made sure the cordova-*.js script is in your .html file.
  3. Replace {your_sender_id} with your GCM sender id
  4. Include the push.js script, and this script's dependencies are included in your app.
  5. Add cordova as a module dependency to your app.

Workflow after optaining the device_id

  1. send the device_id to an application server
  2. store the device_id on the application server
  3. send push notifications with the device_id/token

Example

var result = push.registerPush(function (result) {
  if (result.type === 'registration') {
    localStorage.setItem('device_id', result.id);
    localStorage.setItem('device', result.device);
  }
});

License

MIT

Module stats last updated: 2017-07-12 15:00:09

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!