- Enabling Google Cloud Messaging.
- Creating a Notification Hub in Azure.
- Configuring the Notification Hub with the Chrome APP
- Creating a chrome App for receiving Push Notification. (This is for installing in chrome for getting PushNotification).
- Installing the Chrome App.
- Sending Notification to Chrome App.
In this article I will cover the above mentioned topics one by one. Firstly, I will enable the Google cloud Messaging as follows.
Enabling Google Client Messaging.
To enable Google client messaging we have to follow the following steps in
Google Cloud Console.Login to the Google cloud console, You will find the following screen.
Now In the Dashboard, click the
MyProject and create a new project as follows.
Now it will ask for the name of the project. Give a meaningful name to the project as follows.
After clicking the Create button the project with the given name created which you will see in the dashboard. After this go to Google APIs tab and click that.
Now, go for credentials and select the following option on the screen:
Now, save the senderId that is Project ID.
.
Now, click to create API Key and after that you will get the key. Now copy the api key, this key is needed to configure the Hub in the Azure.
Now, copy the credentials and save the sender Id. So,in this way we can get the API key in Google Cloud Messaging.
Creating a notification hub in Azure
After creating the the API key successfully now we need to create an Azure Hub, where we can use this API key to get the connection string. So, the steps to create the Hub are shown below.
Login to your azure portal by providing correct credentials.
Click
Browse, search for
Service Bus,
Now click the Service Namespace it will ask for your credential and will land you in Service Bus Page.
Here click on Service Bus, Notification Hub, then click Quick Create. Type a name for your notification hub, and then click Create a new Notification Hub.
I have created
ChromeNotification as follows.
Click on it, you will find the following DashBoard.
Now, click the
CONFIGURE tab at the top as follows.
Now scroll down and go up to Google cloud messaging and here you put the API key that you get from Google Cloud Messaging.
Now after entering the key save this and and go to the dashboard and click the
CONNECTION INFORMATION.
Now you will get the following connection string, just copy both of them.
So, in this way we are able to configure the Notification Hub. Now the main thing is to create a Chrome Extension.
Create and Configure the Notification Hub with the Chrome APP
This is the third step towards reaching our destination, because of this Chrome app we will receive push notifications. If you are not aware of how to create a Chrome app you should reach this document below. Here, it is nicely explained how to create a Chrome app.