gcm technology for android
TRANSCRIPT
GCM TECHNOLOGY FOR ANDROID
Ranjitha [email protected]
GCM:
GOOGLE COULD MESSAGING
CONTENTS Introduction C2DM Technology C2DM Advantages&Disadvantages GCM Definition GCM characteristics GCM Working Summary References
INTRODUCTIONPOLL 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
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
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
HOW C2DM WORKS
App Server C2DM Server
App / Device
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
GOOGLE CLOUD MESSAGING
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 thatthere is new data to be fetched from the server ora message containing up to 4kb of payload data (e.g: instant messaging apps).
GCM CHARACTERISTICS● Allows 3rd-party application servers to send
messages to their Android applications.
● GCM makes no guarantees about delivery or the order ofmessages.
● Application on an Android device doesn't need to be running toreceive messages.
● Uses an existing connection for Google services. For pre-4.0devices, this requires users to set up their Google account on their mobile devices.
COMPONENTS AND CREDENTIALS OF GCM:COMPONENTS:
GCM ConnectionServer
Client App
App Server
Google server sending messages between the app server and the client app
Client app with GCM-enabled communicate with your app server
An app server that you write as part of implementing GCM. This server sends data to a client app using GCM connection server.
Component Discription
WHY GCM ? Google migrated its products like :
Blogger to Google BlogsPicasa to Google ImageAdMob to Google AdMobAndroid marketplace to Google play
So It’s time to C2DM to GCM Overcome disadvantages of C2DM
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 )
HOW GCM WORKS
App Server GCM Server
App / Device
HOW GCM WORKS (contd.)The Three Components of GCM 1)Mobile Device: The device that is running an Android application that uses GCM.2) 3rd-party Application Server3) GCM Servers
1) Your application attempts to register with the Google Cloud messaging (GCM) servers.
.
5) The AirBop servers send the message to GCM using the registration Id to target the app and device AirBop delivers the message to the GCM servers along with the registration Ids of re-gistered clients.
6) GCM sends the message to the apps and devices that match 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 op-tional additional information) to the AirBop serv-ers.
7) Your app opens the message and handles the data appropriately. 8) The message can be sent to as many devices that have installed 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.
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
SUMMARY Message Multicasting for News Multiple Senders for Social Updates Time to Live for Events and Promos Messages with Payload for IM
Thank you for your time.