SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Augmented Reality: Use Cases In the Automotive Industry
Augmented Reality: Use Cases In the Automotive IndustryAugmented Reality: Use Cases In the Automotive Industry
Augmented Reality: Use Cases In the Automotive IndustryAudax Labs
 
Screenless display technology
Screenless display technologyScreenless display technology
Screenless display technologyzeelarora
 
User Interfaces and User Centered Design Techniques for Augmented Reality and...
User Interfaces and User Centered Design Techniques for Augmented Reality and...User Interfaces and User Centered Design Techniques for Augmented Reality and...
User Interfaces and User Centered Design Techniques for Augmented Reality and...Stuart Murphy
 
Augmented reality ppt
Augmented reality pptAugmented reality ppt
Augmented reality pptDark Side
 
Introduction to Virtual Reality
Introduction to Virtual RealityIntroduction to Virtual Reality
Introduction to Virtual RealityKAVITHADEVICS
 
Holographic seminar documentation
Holographic seminar documentationHolographic seminar documentation
Holographic seminar documentationGeorgekutty Francis
 
Project glass ppt
Project glass  pptProject glass  ppt
Project glass pptBopanna P M
 
The sixth sense technology complete ppt
The sixth sense technology complete pptThe sixth sense technology complete ppt
The sixth sense technology complete pptatinav242
 
Gesture Recognition Technology
Gesture Recognition TechnologyGesture Recognition Technology
Gesture Recognition TechnologyMuhammad Zeeshan
 
Computer Vision In Augmented Reality
Computer Vision In Augmented RealityComputer Vision In Augmented Reality
Computer Vision In Augmented RealityKnoldus Inc.
 
SCREENLESS DISPLAY
SCREENLESS DISPLAYSCREENLESS DISPLAY
SCREENLESS DISPLAYMahad Mumtaz
 
Screenless Display PPT
Screenless Display PPTScreenless Display PPT
Screenless Display PPTVikas Kumar
 
Mobile computing -- Introduction
Mobile computing -- IntroductionMobile computing -- Introduction
Mobile computing -- Introductionnicole_wang
 
screen less display documentation
screen less display documentationscreen less display documentation
screen less display documentationmani akuthota
 
2022 COMP4010 Lecture 6: Designing AR Systems
2022 COMP4010 Lecture 6: Designing AR Systems2022 COMP4010 Lecture 6: Designing AR Systems
2022 COMP4010 Lecture 6: Designing AR SystemsMark Billinghurst
 

Was ist angesagt? (20)

Augmented Reality: Use Cases In the Automotive Industry
Augmented Reality: Use Cases In the Automotive IndustryAugmented Reality: Use Cases In the Automotive Industry
Augmented Reality: Use Cases In the Automotive Industry
 
Screenless display technology
Screenless display technologyScreenless display technology
Screenless display technology
 
project Soli ppt
project Soli pptproject Soli ppt
project Soli ppt
 
Sixth Sense Technology
Sixth Sense Technology Sixth Sense Technology
Sixth Sense Technology
 
vr
vrvr
vr
 
User Interfaces and User Centered Design Techniques for Augmented Reality and...
User Interfaces and User Centered Design Techniques for Augmented Reality and...User Interfaces and User Centered Design Techniques for Augmented Reality and...
User Interfaces and User Centered Design Techniques for Augmented Reality and...
 
Mobile application testing
Mobile application testingMobile application testing
Mobile application testing
 
Augmented reality ppt
Augmented reality pptAugmented reality ppt
Augmented reality ppt
 
Introduction to Virtual Reality
Introduction to Virtual RealityIntroduction to Virtual Reality
Introduction to Virtual Reality
 
Holographic seminar documentation
Holographic seminar documentationHolographic seminar documentation
Holographic seminar documentation
 
Augmented Reality
Augmented RealityAugmented Reality
Augmented Reality
 
Project glass ppt
Project glass  pptProject glass  ppt
Project glass ppt
 
The sixth sense technology complete ppt
The sixth sense technology complete pptThe sixth sense technology complete ppt
The sixth sense technology complete ppt
 
Gesture Recognition Technology
Gesture Recognition TechnologyGesture Recognition Technology
Gesture Recognition Technology
 
Computer Vision In Augmented Reality
Computer Vision In Augmented RealityComputer Vision In Augmented Reality
Computer Vision In Augmented Reality
 
SCREENLESS DISPLAY
SCREENLESS DISPLAYSCREENLESS DISPLAY
SCREENLESS DISPLAY
 
Screenless Display PPT
Screenless Display PPTScreenless Display PPT
Screenless Display PPT
 
Mobile computing -- Introduction
Mobile computing -- IntroductionMobile computing -- Introduction
Mobile computing -- Introduction
 
screen less display documentation
screen less display documentationscreen less display documentation
screen less display documentation
 
2022 COMP4010 Lecture 6: Designing AR Systems
2022 COMP4010 Lecture 6: Designing AR Systems2022 COMP4010 Lecture 6: Designing AR Systems
2022 COMP4010 Lecture 6: Designing AR Systems
 

Andere mochten auch

서버 푸쉬 (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
 

Andere mochten auch (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]개발하기 바쁜데 푸시서버와 메시지큐는 있는거 쓸래요(김영재)
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
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
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 

Kürzlich hochgeladen (20)

Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
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
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 

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