O'Reilly logo

Hands-on Full Stack Development with Angular 5 and Firebase by Uttam Agarwal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding FCM to our application

In this section, we will configure FCM in our application. We will perform the following steps to configure FCM:

  1. Creating a manifest.json file: Our first step will be to create a manifest.json file within the src folder. This file contains gcm_sender_id, which authorizes a client to a trusted FCM server and enables FCM to send messages to our application. For a desktop browser, the client ID—103953800507remains fixed for a web application, so you don't need to change it.
The web manifest file is a simple JSON file, in which we can specify the configuration for our application, such as its name, display, and orientation.  

Here's the code for manifest.json:

{   "name": "Friends",   "short_name": "Friends",   "start_url" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required