google cloud messaging

16
Google Cloud Messaging In Android Presented by – Amardeep Vijay

Upload: amars-android-tech

Post on 10-May-2015

1.393 views

Category:

Technology


5 download

TRANSCRIPT

Page 1: Google cloud messaging

Google Cloud Messaging In Android

Presented by – Amardeep Vijay

Page 2: Google cloud messaging

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 3: Google cloud messaging

Poll And Push Notifications

• Poll :- Application contact cloud to check new message

Disadvantage :- • Extra Network Usages• Reduced Battery life

Server/Cloud App / Device

Page 4: Google cloud messaging

Poll And Push Notifications (Cont…)

• Push :- Server contact Application or device whenever new message is available

Advantages :- • Reduce extra network uses• Consumes less battery

Server/Cloud App / Device

Page 5: Google cloud messaging

How C2DM Works

App Server C2DM Server

App / Device

Page 6: Google cloud messaging

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

Page 7: Google cloud messaging

Google cloud messaging

Page 8: Google cloud messaging

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 9: Google cloud messaging

GCM

• Stands for Google Cloud Messaging• Used for sending message from Cloud to

Device• Introduce With Android 4.1 Jelly Bean as a

part of Google API 16• Supports Push Notifications

Page 10: Google cloud messaging

How GCM Works

App Server GCM Server

App / Device

Page 11: Google cloud messaging

GCM (Cont…)

• GCM is two way Process –1. Either GCM server registration or2. No GCM server registration required : only

use GCM specific API or simply Google API 16

Application Signing(Generate Application specific fingerprint)

Page 12: Google cloud messaging

Advantage of GCM

Advantages : • Using GCM Developers can develop more

productive apps• GCM is connected to cloud so developers can

get benefits of cloud computing in their apps• GCM is now connected with GAE(Google App

Engine)

Page 13: Google cloud messaging

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 14: Google cloud messaging

Summary

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

Page 15: Google cloud messaging
Page 16: Google cloud messaging

Thank you for your time.