3. INTRODUCTION
POLL AND PUSH NOTIFICATIONS
⢠Poll :- Application contact cloud to check new message
⢠Simple to implement
⢠Device periodically ask server for new data
⢠Used widely where the content changes continuously
Disadvantage :-
⢠Extra Network Usages
⢠Reduced Battery life
Server/Cloud App / Device
4. Poll And Push Notifications (ContâŚ)
⢠Push :-It defines type of internet based communication in
which Server contact Application or device whenever
new message is available
Advantages :-
⢠Reduce extra network uses
⢠Consumes less battery
⢠Harder to implement
Server/Cloud App / Device
5. C2DM
⢠Stands for Cloud to Device Messaging
⢠Used to send message from cloud to device or
application
⢠Support Push Notification
⢠C2DM retired and Itâs time to GCM (Google
Cloud Messaging)
⢠Part of Google API
7. C2DM : Advantages & Disadvantages
Advantages :
⢠Using C2DM Developers can develop more
productive apps
⢠C2DM is connected to cloud so developers can
get benefits of cloud computing in their apps
Disadvantage :
⢠Internet connectivity is required
⢠Limited message size
9. GCM Introduction
⢠GCM (Google Cloud Messaging) is a free service
that helps developers send data from servers to
their Android applications on Android devices.
⢠Lightweight message to applications telling that
there is new data to be fetched from the server or
a message containing up to 4kb of payload data
(e.g: instant messaging apps).
10. GCM Characteristics
â Allows 3rd-party application servers to send messages to their
Android applications.
â GCM makes no guarantees about delivery or the order of
messages.
â Application on an Android device doesn't need to be running to
receive messages.
â Uses an existing connection for Google services. For pre-4.0
devices, this requires users to set up their Google account on
their mobile devices.
11. Minimum requirements ( device side )
⢠Android 2.2 +
⢠Android market place should be
installed
⢠Emulator with Google APIs
⢠Internet connection
⢠Google account
( device version < 4.0.4 )
12. Why GCM ?
⢠Application does not need to be running in
background to receive messages
⢠Background processes polling server at regular
intervals for information is a bad design
⢠Overcome disadvantages of C2DM
⢠Battery efficiency
⢠Ease of use
⢠Reduced network usage
14. HOW GCM WORKS (contd.)
The Three Components of GCM
1)Mobile Device: The device that is running an Android application th
at uses GCM.
2) 3rd-party Application Server
3) GCM Servers
1) Your application attempts to register with the Google Cloud messa
ging (GCM) servers..
15. 5) The AirBop servers send the message to GCM using the re
gistration Id to target the app and device AirBop delivers the
message to the GCM servers along with the registration Ids o
f registered clients.
6) GCM sends the message to the apps and devices that mat
ch the registration Id(s).
4) You compose a message on the AirBop website
2) GCM registers your device and generates a registration Id
for your application.
3) Your app sends the registration Id (plus optional additional
information) to the AirBop servers.
16. 7) Your app opens the message and handles the data appropriat
ely.
8) The message can be sent to as many devices that have install
ed your app and registered with the server.
Of course in a real situation your message will probably be deliv
ered to tens of thousands of devices not just one or two.
17. Working Example of GCM
Google Play :
⢠Google play uses GCM to
install requested android
apps from Google play
official site.
(http://play.google.com)
⢠Google play android app
uses GCM to receive
requested apps from google
play
18. Summary
⢠Message Multicasting for News
⢠Multiple Senders for Social Updates
⢠Time to Live for Events and Promos
⢠Messages with Payload for IM