GCM Technology for Android

21
GCM TECHNOLOGY FOR ANDROID Ranjitha Ravi [email protected]

Transcript of GCM Technology for Android

Page 1: GCM Technology for Android

GCM TECHNOLOGY FOR ANDROID

Ranjitha [email protected]

Page 2: GCM Technology for Android

GCM:

GOOGLE COULD MESSAGING

Page 3: GCM Technology for Android

CONTENTS Introduction C2DM Technology C2DM Advantages&Disadvantages GCM Definition GCM characteristics GCM Working Summary References

Page 4: GCM Technology for Android

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

Page 5: GCM Technology for Android

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

Page 6: GCM Technology for Android

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

Page 7: GCM Technology for Android

HOW C2DM WORKS

App Server C2DM Server

App / Device

Page 8: GCM Technology for Android

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

Page 9: GCM Technology for Android

GOOGLE CLOUD MESSAGING

Page 10: GCM Technology for Android

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).

Page 11: GCM Technology for Android

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.

Page 12: GCM Technology for Android

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

Page 13: GCM Technology for Android

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

Page 14: GCM Technology for Android

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 )

Page 15: GCM Technology for Android

HOW GCM WORKS

App Server GCM Server

App / Device

Page 16: GCM Technology for Android

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.

.

Page 17: GCM Technology for Android

 

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.

Page 18: GCM Technology for Android

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.

Page 19: GCM Technology for Android

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

Page 20: GCM Technology for Android

SUMMARY Message Multicasting for News Multiple Senders for Social Updates Time to Live for Events and Promos Messages with Payload for IM

Page 21: GCM Technology for Android

Thank you for your time.