Skip to content

Latest commit

 

History

History
35 lines (21 loc) · 1.43 KB

File metadata and controls

35 lines (21 loc) · 1.43 KB

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.