Im working on a ide where I as an admin can send notifications to all my clients(mobile). Ive been searching and found GCM and other services... I want to know if there is any s
Polling will result to more battery life consumption and some other extra unnecessary process (as also mentioned in the comments by @MohammedAtif), for example, is when your client app makes the call to your server but ends up empty. The process is wasted since nothing really happened.
GCM doesn't do that. Gonna refer to the official docs on it's flow.
Lifecycle Flow
- Send and receive downstream messages.
- Send a message. The app server sends messages to the client app:
- The app server sends a message to GCM connection servers.
- The GCM connection server enqueues and stores the message if the device is offline.
- When the device is online, the GCM connection server sends the message to the device.
- On the device, the client app receives the message according to the platform-specific implementation. See your platform-specific documentation for details.
- Receive a message. A client app receives a message from a GCM connection server.
Also announced in the recent I/O 2016, GCM's successor is now Firebase Cloud Messaging, which not only has the Push Notification Service, but also has other features (one example is Analytics) for free.
So overall, using GCM (or FCM) is a simpler method than polling. It handles the queuing of the messages you sent, and some others.