up a Firebase Cloud Messaging (FCM) account • Techniques for requesting GCM to send a notification to a web client • Notification display • Notification click handling
basic understanding of git, and Chrome DevTools • Experience of service worker would also be useful, but is not crucial • The sample code • A text editor • Python or a simple local web server.
file var dbEngine = indexedDB.open(dbName, dbVersion); dbEngine.onupgradeneeded = function (event) { log("That's cool, we are upgrading"); // Create ObjectStore var db = event.target.result; if (!db.objectStoreNames.contains(TODO_STORE)) { var objectStore = db.createObjectStore(TODO_STORE, {keyPath: "id", autoIncrement: true}); } };
• Click the Create credentials dropdown button and select API key: • Click the Go to Credentials button • For Where will you be calling the API from? Select Web Browser (Javascript) • Click the What Credentials do I need button • Give the key a name (anything you like!), leave the HTTP referrers field blank and click the Create API Key button:
switch to Console • Click on the Subscribe button • Right click on the link in the console and copy it • The subscription ID is the part after the last slash in the url Usually looks like this: eRiejdjxANbd_aY:APA91bFx_ZbfwOMbwL7hHVomb-47EMwD GTxOKTnf1JJEgj9nWxZ_yr7lLqwBtj_P_JZsEHjVCcwleVKn NEJpLVUYjejfIvSD9Y1WFhvsp4ic8wUxloqaPnZwUMRB-dJb OsDPm48biXYvshdhj