Google cloud Messaging (GCM) is a service that helps developer to send push notification data to any Android devices. With help of this feature developer can send push message to Android device whenever new data or promotion offers arrives in Android application.
Today lots of Android applications using Google cloud Messaging service to send multiple push messages to multiple Android devices. You can find more at it’s official document at https://developers.google.com/cloud-messaging/
Push Notification flow with PHP Web Server APP and GCM
- Android device send Sender Id and application Id to GCM server.
- GCM server generates unique registration Id and sends them back to Android device.
- Android device sends registration Id to PHP web server application.
- PHP web server stores registration Id to Database for later use.
- When server needs to send Push Message, It fetch previously stored registration Id from Database
- And send them to the GCM server along with the push message data.
- GCM server will send that message to particular Android device using device registration Id