SlideShare a Scribd company logo
1 of 14
Lavakush Verma
Introduction
Google Cloud Messaging for Android (GCM):
 Its a service that helps developers send data from servers to their
Android applications on Android devices.
 It could be a lightweight message telling application to fetch new data, or
a message with payload data to be consumed instantly.
 GCM handles all aspects of queuing of messages and ensures delivery
to the application on target devices up to a great extent.
 The best part, its totally free irrespective of your needs and has No Quota
system as we had with version of C2DM.
 It’s a replacement to C2DM, which is now deprecated. As no more C2DM
signups are acceptable.

 Provides backward support for devices running on Android 2.2 OS
version. Pre OS-Ver 3.x devices, it requires to setup at least on Google
account. Which is not at all required for devices running Ver-4.0 and
above.

1
GCM Architecture
 Components: physical entities
– Mobile Device (running with 2.2 or above OS Version)
– 3rd Party App Server
– GCM Servers

 Credentials: to ensure approved sender and delivery to correct
place
– SenderID (ProjectID)
– ApplicationID
– RegistrationID
– Google Account: if device running below ICS version.
– Sender Auth Token

2
Enabling GCM: Registration

@Override
protected void onCreate(Bundle saveInstanceState){
if( GCMRegistrar.getRegistrationId(this).equals(“”)){

GCMRegistrar. Register(this, “965748474884”);
}
}
@Override
protected void onRegistered(Context ctx, String regId){

sendToFootballServer(regId);
}

3
How GCM Server works?
(Receiving/Sending)
Content-Type:application/json
Authorization:key=AIzaSyB-1uEai2WiUapxCs2Q0GZYzPu7Udno5aA
{ “registration_ids” : [“APA91bHun4MxP5egoKMwt2KZFBaFUH-1RYqx...”],
“data” : { “Team” : “Portugal”,
“Score” : “3”,
“Player” : “Varela”,
},
}

4
Sending a Message:
 The application server issues a POST request to
https://android.googleapis.com/gcm/send
HttpRequest :Body(JSON)
{
"collapse_key": "score_update",
"time_to_live": 108,
“delay_while_idle": true,
"data": { "score": "4x8", "time": "15:16.2342" },
"registration_ids":["4", "8", "15", "16", "23", "42"]
}

HttpResponse:Body(JSON)
{
"multicast_id": 216,
"success": 3,
"failure": 3,
"canonical_ids": 1,
"results": [ { "message_id": "1:0408" },
{ "error": "Unavailable" },
{ "error": "InvalidRegistration" },
{ "message_id": "1:1516" },
{ "message_id": "1:2342", "registration_id": "32" },
{ "error": "NotRegistered"} ]
}

5
Uniqueness of GCM: Features
 Message Multicasting
– More than 1 devices can receive one message simultaneously

 Multiple Senders with Single RegID
– More than 1 server can send messages to one App

 TTL : Time To Live
– Expiry of sent messages

 Messages with Payload
– To avoid sync with server for certain needs.

 Throttle Queue
– GCM Optimization for battery

 GCM Reliability

6
Message Multicasting
 One Message Request – Many Devices
 Up to 1000 Devices simultaneously

7
Multiple Senders
 One common Registration ID
 Multiple sender can send messages to one Application
 Up to 100 Project IDs (Servers)
@Override
protected void onCreate(Bundle savedInstanceState) {
if (GCMRegistrar.getRegistrationId(this).equals(“”)) {
GCMRegistrar.register(this, “968350041068”, “652183961211”);
}

8
TTL: Time To Live
 Indicates the duration to which GCM can store this message.
 From 0 sec to 4 weeks
 Messages with 0 will not be stored on GCM (Receive – Send –
Delete)
 Default is 4 Weeks
 Best Use case for Advertisements( Like sending deals and offers
during football match)

9
Messages with Payload
 Payload up to 4K per message
 Up to 100 Messages can be stored
 Deletes all and creates a message to trigger sync after that

 Best use for Ims and Online Server Gaming Apps
{
“message_type” : “deleted_messages”,
“total_deleted” : “115”,
},

10
GCM Optimization
 Throttle Queue
– Provide fresh data all the time.
– Optimized for battery life.
– Delay in Delivery

 Reliability

11
GCM Un-Registration

12
Google Cloud Messaging

More Related Content

What's hot

Real time gesture recognition
Real time gesture recognitionReal time gesture recognition
Real time gesture recognitionJaison2636
 
SMART NOTE TAKER REPORT
SMART NOTE TAKER REPORTSMART NOTE TAKER REPORT
SMART NOTE TAKER REPORTVivek Jha
 
Optical Computing
Optical ComputingOptical Computing
Optical ComputingBise Mond
 
Computer science seminar topics
Computer science seminar topicsComputer science seminar topics
Computer science seminar topics123seminarsonly
 
20 Latest Computer Science Seminar Topics on Emerging Technologies
20 Latest Computer Science Seminar Topics on Emerging Technologies20 Latest Computer Science Seminar Topics on Emerging Technologies
20 Latest Computer Science Seminar Topics on Emerging TechnologiesSeminar Links
 
Blue eyes technology ppt. by UTKARSH LOKPRIYE
Blue eyes technology ppt. by UTKARSH LOKPRIYEBlue eyes technology ppt. by UTKARSH LOKPRIYE
Blue eyes technology ppt. by UTKARSH LOKPRIYEUtkarsh Lokpriye
 
Blue Eyes ppt
Blue Eyes pptBlue Eyes ppt
Blue Eyes pptdeepu427
 
Blue eyes technology monitoring human operator and intelligence sensing 1
Blue eyes technology monitoring human operator and intelligence sensing 1Blue eyes technology monitoring human operator and intelligence sensing 1
Blue eyes technology monitoring human operator and intelligence sensing 1keerthi k
 
Optical character recognition IEEE Paper Study
Optical character recognition IEEE Paper StudyOptical character recognition IEEE Paper Study
Optical character recognition IEEE Paper StudyEr. Ashish Pandey
 
Smart note taker
Smart note takerSmart note taker
Smart note takerVivek Jha
 
Internet of Things (IOT) - Technology and Applications
Internet of Things (IOT) - Technology and ApplicationsInternet of Things (IOT) - Technology and Applications
Internet of Things (IOT) - Technology and ApplicationsDr. Mazlan Abbas
 
Blue Eye Technology Seminar Presentation
Blue Eye Technology Seminar PresentationBlue Eye Technology Seminar Presentation
Blue Eye Technology Seminar PresentationVaibhav Kumar
 

What's hot (20)

Blue eye technology ppt
Blue eye technology pptBlue eye technology ppt
Blue eye technology ppt
 
Real time gesture recognition
Real time gesture recognitionReal time gesture recognition
Real time gesture recognition
 
SMART NOTE TAKER REPORT
SMART NOTE TAKER REPORTSMART NOTE TAKER REPORT
SMART NOTE TAKER REPORT
 
Optical Computing
Optical ComputingOptical Computing
Optical Computing
 
Computer science seminar topics
Computer science seminar topicsComputer science seminar topics
Computer science seminar topics
 
20 Latest Computer Science Seminar Topics on Emerging Technologies
20 Latest Computer Science Seminar Topics on Emerging Technologies20 Latest Computer Science Seminar Topics on Emerging Technologies
20 Latest Computer Science Seminar Topics on Emerging Technologies
 
Blue eyes technology
Blue eyes technologyBlue eyes technology
Blue eyes technology
 
Blue eyes technology ppt. by UTKARSH LOKPRIYE
Blue eyes technology ppt. by UTKARSH LOKPRIYEBlue eyes technology ppt. by UTKARSH LOKPRIYE
Blue eyes technology ppt. by UTKARSH LOKPRIYE
 
Blue Eyes ppt
Blue Eyes pptBlue Eyes ppt
Blue Eyes ppt
 
skinput technology
skinput technologyskinput technology
skinput technology
 
Blue eyes technology monitoring human operator and intelligence sensing 1
Blue eyes technology monitoring human operator and intelligence sensing 1Blue eyes technology monitoring human operator and intelligence sensing 1
Blue eyes technology monitoring human operator and intelligence sensing 1
 
Touchless touch screen
Touchless touch screenTouchless touch screen
Touchless touch screen
 
Final (3).pptx
Final (3).pptxFinal (3).pptx
Final (3).pptx
 
Smart note taker
Smart note taker Smart note taker
Smart note taker
 
Optical character recognition IEEE Paper Study
Optical character recognition IEEE Paper StudyOptical character recognition IEEE Paper Study
Optical character recognition IEEE Paper Study
 
IoT Basics
IoT BasicsIoT Basics
IoT Basics
 
Smart note taker
Smart note takerSmart note taker
Smart note taker
 
Gesture recognition
Gesture recognitionGesture recognition
Gesture recognition
 
Internet of Things (IOT) - Technology and Applications
Internet of Things (IOT) - Technology and ApplicationsInternet of Things (IOT) - Technology and Applications
Internet of Things (IOT) - Technology and Applications
 
Blue Eye Technology Seminar Presentation
Blue Eye Technology Seminar PresentationBlue Eye Technology Seminar Presentation
Blue Eye Technology Seminar Presentation
 

Viewers also liked

서버 푸쉬 (c#)
서버 푸쉬   (c#) 서버 푸쉬   (c#)
서버 푸쉬 (c#) Shon Parker
 
푸시윙 - 앱이 없는 웹사이트를 위한 무료 푸시 알림 서비스
푸시윙 - 앱이 없는 웹사이트를 위한 무료 푸시 알림 서비스푸시윙 - 앱이 없는 웹사이트를 위한 무료 푸시 알림 서비스
푸시윙 - 앱이 없는 웹사이트를 위한 무료 푸시 알림 서비스Hyun-Seok Lee
 
GCM Android
GCM AndroidGCM Android
GCM Androidaswapnal
 
Iris-iPNS / 푸시 솔루션 (Push Solution) 제품 소개
Iris-iPNS / 푸시 솔루션 (Push Solution)  제품 소개Iris-iPNS / 푸시 솔루션 (Push Solution)  제품 소개
Iris-iPNS / 푸시 솔루션 (Push Solution) 제품 소개현용 황
 
[Td 2015]개발하기 바쁜데 푸시서버와 메시지큐는 있는거 쓸래요(김영재)
[Td 2015]개발하기 바쁜데 푸시서버와 메시지큐는 있는거 쓸래요(김영재)[Td 2015]개발하기 바쁜데 푸시서버와 메시지큐는 있는거 쓸래요(김영재)
[Td 2015]개발하기 바쁜데 푸시서버와 메시지큐는 있는거 쓸래요(김영재)Sang Don Kim
 

Viewers also liked (6)

서버 푸쉬 (c#)
서버 푸쉬   (c#) 서버 푸쉬   (c#)
서버 푸쉬 (c#)
 
푸시윙 - 앱이 없는 웹사이트를 위한 무료 푸시 알림 서비스
푸시윙 - 앱이 없는 웹사이트를 위한 무료 푸시 알림 서비스푸시윙 - 앱이 없는 웹사이트를 위한 무료 푸시 알림 서비스
푸시윙 - 앱이 없는 웹사이트를 위한 무료 푸시 알림 서비스
 
GCM Android
GCM AndroidGCM Android
GCM Android
 
Iris-iPNS / 푸시 솔루션 (Push Solution) 제품 소개
Iris-iPNS / 푸시 솔루션 (Push Solution)  제품 소개Iris-iPNS / 푸시 솔루션 (Push Solution)  제품 소개
Iris-iPNS / 푸시 솔루션 (Push Solution) 제품 소개
 
Google Cloud Messaging
Google Cloud Messaging Google Cloud Messaging
Google Cloud Messaging
 
[Td 2015]개발하기 바쁜데 푸시서버와 메시지큐는 있는거 쓸래요(김영재)
[Td 2015]개발하기 바쁜데 푸시서버와 메시지큐는 있는거 쓸래요(김영재)[Td 2015]개발하기 바쁜데 푸시서버와 메시지큐는 있는거 쓸래요(김영재)
[Td 2015]개발하기 바쁜데 푸시서버와 메시지큐는 있는거 쓸래요(김영재)
 

Similar to Google Cloud Messaging

google cloud messaging
google cloud messaginggoogle cloud messaging
google cloud messagingBhavana Sharma
 
Introduction to google cloud messaging in android
Introduction to google cloud messaging in androidIntroduction to google cloud messaging in android
Introduction to google cloud messaging in androidRIA RUI Society
 
GCM Technology for Android
GCM Technology for AndroidGCM Technology for Android
GCM Technology for AndroidRanjitha R_14
 
GCM with Pushbots
GCM with PushbotsGCM with Pushbots
GCM with PushbotsAshish RAj
 
Максим Щеглов - Google Cloud Messaging for Android
Максим Щеглов - Google Cloud Messaging for AndroidМаксим Щеглов - Google Cloud Messaging for Android
Максим Щеглов - Google Cloud Messaging for AndroidUA Mobile
 
GOOGLE CLOUD MESSAGING (GCM): A LIGHT WEIGHT COMMUNICATION MECHANISM BETWEEN ...
GOOGLE CLOUD MESSAGING (GCM): A LIGHT WEIGHT COMMUNICATION MECHANISM BETWEEN ...GOOGLE CLOUD MESSAGING (GCM): A LIGHT WEIGHT COMMUNICATION MECHANISM BETWEEN ...
GOOGLE CLOUD MESSAGING (GCM): A LIGHT WEIGHT COMMUNICATION MECHANISM BETWEEN ...ijistjournal
 
Gcm presentation
Gcm presentationGcm presentation
Gcm presentationNiraj Singh
 
Building a chat app with windows azure mobile
Building a chat app with windows azure mobileBuilding a chat app with windows azure mobile
Building a chat app with windows azure mobileFlavius-Radu Demian
 
Automate+ Final Presentation
Automate+ Final PresentationAutomate+ Final Presentation
Automate+ Final PresentationSanat Maharjan
 
Android Cloud To Device Messaging
Android Cloud To Device MessagingAndroid Cloud To Device Messaging
Android Cloud To Device MessagingFernando Cejas
 
Android cloud to device messaging
Android cloud to device messagingAndroid cloud to device messaging
Android cloud to device messagingFe
 
GOOGLE CLOUD MESSAGING PPT 2017
GOOGLE CLOUD MESSAGING PPT 2017GOOGLE CLOUD MESSAGING PPT 2017
GOOGLE CLOUD MESSAGING PPT 2017ketan Bordekar
 
Android push-applications-android
Android push-applications-androidAndroid push-applications-android
Android push-applications-androidwadise
 

Similar to Google Cloud Messaging (20)

google cloud messaging
google cloud messaginggoogle cloud messaging
google cloud messaging
 
Introduction to google cloud messaging in android
Introduction to google cloud messaging in androidIntroduction to google cloud messaging in android
Introduction to google cloud messaging in android
 
GCM aperitivo Android
GCM aperitivo AndroidGCM aperitivo Android
GCM aperitivo Android
 
GCM Technology for Android
GCM Technology for AndroidGCM Technology for Android
GCM Technology for Android
 
GCM with Pushbots
GCM with PushbotsGCM with Pushbots
GCM with Pushbots
 
A Journey into Google Cloud Messaging
A Journey into Google Cloud MessagingA Journey into Google Cloud Messaging
A Journey into Google Cloud Messaging
 
google cloud messaging
google cloud messaginggoogle cloud messaging
google cloud messaging
 
Максим Щеглов - Google Cloud Messaging for Android
Максим Щеглов - Google Cloud Messaging for AndroidМаксим Щеглов - Google Cloud Messaging for Android
Максим Щеглов - Google Cloud Messaging for Android
 
Magda badita gcm
Magda badita  gcmMagda badita  gcm
Magda badita gcm
 
Workshop: Android
Workshop: AndroidWorkshop: Android
Workshop: Android
 
GCM for Android
GCM for AndroidGCM for Android
GCM for Android
 
GOOGLE CLOUD MESSAGING (GCM): A LIGHT WEIGHT COMMUNICATION MECHANISM BETWEEN ...
GOOGLE CLOUD MESSAGING (GCM): A LIGHT WEIGHT COMMUNICATION MECHANISM BETWEEN ...GOOGLE CLOUD MESSAGING (GCM): A LIGHT WEIGHT COMMUNICATION MECHANISM BETWEEN ...
GOOGLE CLOUD MESSAGING (GCM): A LIGHT WEIGHT COMMUNICATION MECHANISM BETWEEN ...
 
Gcm presentation
Gcm presentationGcm presentation
Gcm presentation
 
AutoMate+
AutoMate+AutoMate+
AutoMate+
 
Building a chat app with windows azure mobile
Building a chat app with windows azure mobileBuilding a chat app with windows azure mobile
Building a chat app with windows azure mobile
 
Automate+ Final Presentation
Automate+ Final PresentationAutomate+ Final Presentation
Automate+ Final Presentation
 
Android Cloud To Device Messaging
Android Cloud To Device MessagingAndroid Cloud To Device Messaging
Android Cloud To Device Messaging
 
Android cloud to device messaging
Android cloud to device messagingAndroid cloud to device messaging
Android cloud to device messaging
 
GOOGLE CLOUD MESSAGING PPT 2017
GOOGLE CLOUD MESSAGING PPT 2017GOOGLE CLOUD MESSAGING PPT 2017
GOOGLE CLOUD MESSAGING PPT 2017
 
Android push-applications-android
Android push-applications-androidAndroid push-applications-android
Android push-applications-android
 

Recently uploaded

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Recently uploaded (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

Google Cloud Messaging

  • 2. Introduction Google Cloud Messaging for Android (GCM):  Its a service that helps developers send data from servers to their Android applications on Android devices.  It could be a lightweight message telling application to fetch new data, or a message with payload data to be consumed instantly.  GCM handles all aspects of queuing of messages and ensures delivery to the application on target devices up to a great extent.  The best part, its totally free irrespective of your needs and has No Quota system as we had with version of C2DM.  It’s a replacement to C2DM, which is now deprecated. As no more C2DM signups are acceptable.  Provides backward support for devices running on Android 2.2 OS version. Pre OS-Ver 3.x devices, it requires to setup at least on Google account. Which is not at all required for devices running Ver-4.0 and above. 1
  • 3. GCM Architecture  Components: physical entities – Mobile Device (running with 2.2 or above OS Version) – 3rd Party App Server – GCM Servers  Credentials: to ensure approved sender and delivery to correct place – SenderID (ProjectID) – ApplicationID – RegistrationID – Google Account: if device running below ICS version. – Sender Auth Token 2
  • 4. Enabling GCM: Registration @Override protected void onCreate(Bundle saveInstanceState){ if( GCMRegistrar.getRegistrationId(this).equals(“”)){ GCMRegistrar. Register(this, “965748474884”); } } @Override protected void onRegistered(Context ctx, String regId){ sendToFootballServer(regId); } 3
  • 5. How GCM Server works? (Receiving/Sending) Content-Type:application/json Authorization:key=AIzaSyB-1uEai2WiUapxCs2Q0GZYzPu7Udno5aA { “registration_ids” : [“APA91bHun4MxP5egoKMwt2KZFBaFUH-1RYqx...”], “data” : { “Team” : “Portugal”, “Score” : “3”, “Player” : “Varela”, }, } 4
  • 6. Sending a Message:  The application server issues a POST request to https://android.googleapis.com/gcm/send HttpRequest :Body(JSON) { "collapse_key": "score_update", "time_to_live": 108, “delay_while_idle": true, "data": { "score": "4x8", "time": "15:16.2342" }, "registration_ids":["4", "8", "15", "16", "23", "42"] } HttpResponse:Body(JSON) { "multicast_id": 216, "success": 3, "failure": 3, "canonical_ids": 1, "results": [ { "message_id": "1:0408" }, { "error": "Unavailable" }, { "error": "InvalidRegistration" }, { "message_id": "1:1516" }, { "message_id": "1:2342", "registration_id": "32" }, { "error": "NotRegistered"} ] } 5
  • 7. Uniqueness of GCM: Features  Message Multicasting – More than 1 devices can receive one message simultaneously  Multiple Senders with Single RegID – More than 1 server can send messages to one App  TTL : Time To Live – Expiry of sent messages  Messages with Payload – To avoid sync with server for certain needs.  Throttle Queue – GCM Optimization for battery  GCM Reliability 6
  • 8. Message Multicasting  One Message Request – Many Devices  Up to 1000 Devices simultaneously 7
  • 9. Multiple Senders  One common Registration ID  Multiple sender can send messages to one Application  Up to 100 Project IDs (Servers) @Override protected void onCreate(Bundle savedInstanceState) { if (GCMRegistrar.getRegistrationId(this).equals(“”)) { GCMRegistrar.register(this, “968350041068”, “652183961211”); } 8
  • 10. TTL: Time To Live  Indicates the duration to which GCM can store this message.  From 0 sec to 4 weeks  Messages with 0 will not be stored on GCM (Receive – Send – Delete)  Default is 4 Weeks  Best Use case for Advertisements( Like sending deals and offers during football match) 9
  • 11. Messages with Payload  Payload up to 4K per message  Up to 100 Messages can be stored  Deletes all and creates a message to trigger sync after that  Best use for Ims and Online Server Gaming Apps { “message_type” : “deleted_messages”, “total_deleted” : “115”, }, 10
  • 12. GCM Optimization  Throttle Queue – Provide fresh data all the time. – Optimized for battery life. – Delay in Delivery  Reliability 11