GCM Receiver Class
Now we extend GCM Receiver Class to BroadcastReceiver Class and we override the method onReceive and call the GCMService class using the intent method.
Receive A Message Notification
Now move to the GCMService.java class and make this method to receive the message at mobile-only powered by android app devices. Futhermore we call this method into another method in the next step.
Receive A Message Using Intent Service
Now in this class first we extend our class with IntentService and then we declare some class instances on the class level then we make a default constructor and pass it GCMService class and then we override the method onHandle and set two methods and then call the sendNotification method which is created in previous step.
Check Registered Devices from Web Server
Now I will give you the link in which you can register and take your GCM ID and then send a message to android device.
Server Link
Now open the Android Studio and run the project
Visual Representation
Now you see that we send the message to webserver and web server sends the message to android device. This is the end of Google Cloud Messaging Services.
Read more articles on
Android