Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
images
js
LICENSE
LICENSE.push-notifications
NOTICE
README.md
index.html
manifest.json
sw.js

README.md

Chrome Push API with AeroGear Unified Push Example

This sample is based on two articles from Google:

We suggest to read them both for better understanding of Push API, Service Worker and how it works in Google Chrome.

Demo

This video provides additional explanations and shows how it works in reality:

Chrome Push API with AeroGear Unified Push Demo

Getting started!

Prerequisites

  • Chrome 42+
  • AeroGear UnifiedPush server

To make it workable you have to complete two steps:

  1. Set up your FCM/GCM Sender ID in manifest.json
  2. Set up Variant-ID, Variant-Secret and URL for your AeroGear UnifiedPush Server instance in main.js

For this sample you will need to run a local web server. You may already have your own setup for this. Otherwise open a terminal window, navigate to the current directory and run the following Python command to start a server:

python -m SimpleHTTPServer

This will start a web server on the default HTTP port. Open http://localhost:8000 from your Google Chrome to see the main page.