google cloud messaging

19
SEMINAR ON GOOGLE CLOUD MESSAGING Submitted By: Shubham Shukla B.Tech(CSE),CS-33 1120432147 Babu Banarasi Das University 1 Submitted To- Vivek Sir

Transcript of google cloud messaging

1

SEMINAR ON

GOOGLE CLOUD MESSAGING

Submitted By:Shubham ShuklaB.Tech(CSE),CS-331120432147

Babu Banarasi Das University

Submitted To-Vivek Sir

CONTENTS

• Introduction• C2DM Technology • GCM Definition • GCM characteristics • GCM Working• Summary• References

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

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 appsDisadvantage :• 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 theirAndroid 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.

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 )

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

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 mes-saging (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 registered 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 optional additional information) to the AirBop servers.

7) Your app opens the message and handles the data appropri-ately. 8) The message can be sent to as many devices that have in-stalled 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.