Through this blog I hope to be able to provide you enough information to build a push chat notification application. To write a push chat application we need a service which will receive the notification to publish to all registered users and second, an application which can publish any important news to the Google Push Notification server.
In this example we are using GCM service to receive the notification and publish it to all registered users. We can create a GCM service using console.developers.google.com API. After we create a GCM service, the push chat notification application is ready for use. The application is written using Xamarin.
This is an android based application which can be used to publish important news to all deployed and registered mobile users through the Google Push Notification server. Whenever a new post occurs a notification will be sent to every registered user.
To create a GCM service :
- Step1: Create a GCM service project
- Step 2: Provide API access permission of GCM to android.
- Step 3: In order to send and receive notifications, two important things to note are:
– The project number for registering your application to GCM; and
– The project API key to send the message to GCM for notifying all registered applications/mobiles.
To create a Push Chat Notification Application :
- Step1: Create a Xamarin Android application.
- Step2: Add GCM service, Json.net and http client from NuGet online service.
- Step3: Add permission to your Push chat application. Below is the copy of the manifest xml.
- Step4: Deploy your application on your android mobile and send any notification!
Author: Bivash Biswas