SlideShare a Scribd company logo
1 of 25
Ashish Raj
Student- MIMIT MALOUT
About me
Research Scholar
Developer cum Corporate
Trainer at Xperia Technologies
Pvt. Ltd.
Workshop Event Organizer –
National Android Development
Challenge (NADC)
What we will be discussing today.
Google Cloud Messaging
What is
GCM?
Why do we
need GCM?
How it is
implemented
?
What is GCM?
GCM definition
 GCM stands for Google Cloud Messaging .
 It is a free service that allows developers to send data from third
party servers to their applications running on android devices
 Handles queuing of messages and delivery to the target
application running on the target device.
 Intended use is not to send huge amount of data to the client
device
Things to keep in mind
Application on the android device DOES
NOT need to be running to receive
messages.
Requires user to set up a Google account
on the device.
It is purely a routing component
There is no guaranteed delivery of
messages to the device .
Focus of GCM
Ease of use. No
sign-up forms.
No quotas.
GCM stats are
available through
the Android
Developer
Console.
Battery efficiency.
Rich set of new
APIs
Difference between GCM and C2DM
Simple API Key from Google
APIs console page.
Sender id is the project id rather
than email address
Supports data in JSON format
and plain text
Difference between GCM and C2DM
Multicast message support
Multiple senders
Messages have time to live ( 0 ~
4 weeks ) eg. Expiring invitations
Payload up to 4kb
Why do we need GCM?
The need to use GCM
 Client server architecture is the most common architecture .
 Most application do all the heavy lifting and processing at
the servers and then use the processed data within the
applications .
 Scalability & extensibility
 More computing power
 Background process polling server for information at regular
intervals is a bad design
 Battery performance
 System resource usage ( memory , CPU )
 Complicated coding
The need to use GCM
 Less coding required
 Not need to worry about queuing of messages
 Differed delivery
 Simpler application flow
 Application does not need to be running in the background for
receiving data messages.
 Lower cost and better tracking than SMS.
How it is implemented?
Major Components
Your application server
GCM servers
Mobile device
Typical sequence of events
The application
server sends a
message to
GCM servers.
Google queues
and stores the
message in
case the device
is offline.
When the
device is
online, Google
sends the
message to the
device.
On the device,
the system
broadcasts the
message to the
specified
Android. This
wakes the
Android
application up.
The Android
application
processes the
message
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 )
Minimum requirements ( server side )
HTTPS application server that should be
Able to communicate with your client.
Able to fire off HTTP requests to the GCM
server.
Able to handle requests and queue data as
needed. For example, it should be able to
perform exponential back off.
Able to store the user device registration id .
PushBots application
Creating
GCM
Sender ID
Creating
GCM API
Key
Add API
Key to
your
PushBots
Applicati
on Create
your
Android
project
Impleme
nt
PushBots
framewor
k
Send
your first
Push
Snapshots
1 Creating GCM Sender ID
Sender ID
2. Creating GCM API Key
3. Add API Key to your PushBots Application
4. Create your Android project
5. Implement PushBots framework
6. Send your first Push
Thank you

More Related Content

What's hot

Google Cloud Messaging
Google Cloud Messaging Google Cloud Messaging
Google Cloud Messaging Sandip Jadhav
 
GCM Android
GCM AndroidGCM Android
GCM Androidaswapnal
 
Максим Щеглов - Google Cloud Messaging for Android
Максим Щеглов - Google Cloud Messaging for AndroidМаксим Щеглов - Google Cloud Messaging for Android
Максим Щеглов - Google Cloud Messaging for AndroidUA Mobile
 
Firebase Cloud Messaging Device to Device
Firebase Cloud Messaging Device to DeviceFirebase Cloud Messaging Device to Device
Firebase Cloud Messaging Device to DeviceTakuma Lee
 
GCM Technology for Android
GCM Technology for AndroidGCM Technology for Android
GCM Technology for AndroidRanjitha R_14
 
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
 
Push it! How to use Google Cloud Messaging in your Android App
Push it! How to use Google Cloud Messaging in your Android AppPush it! How to use Google Cloud Messaging in your Android App
Push it! How to use Google Cloud Messaging in your Android AppAchim Fischer
 
Push Notification for Android, iOS & Sever Side Using Firebase Cloud Messaging
Push Notification for Android, iOS & Sever Side Using Firebase Cloud MessagingPush Notification for Android, iOS & Sever Side Using Firebase Cloud Messaging
Push Notification for Android, iOS & Sever Side Using Firebase Cloud MessagingCumulations Technologies
 
Google App Engine's Latest Features
Google App Engine's Latest FeaturesGoogle App Engine's Latest Features
Google App Engine's Latest FeaturesChris Schalk
 
What is Google App Engine
What is Google App EngineWhat is Google App Engine
What is Google App EngineChris Schalk
 
Google app engine introduction
Google app engine introductionGoogle app engine introduction
Google app engine introductionrajsandhu1989
 
App Engine Overview @ Google Hackathon SXSW 2010
App Engine Overview @ Google Hackathon SXSW 2010App Engine Overview @ Google Hackathon SXSW 2010
App Engine Overview @ Google Hackathon SXSW 2010Chris Schalk
 
Google App Engine: An Introduction
Google App Engine: An IntroductionGoogle App Engine: An Introduction
Google App Engine: An IntroductionAbu Ashraf Masnun
 

What's hot (20)

google cloud messaging
google cloud messaginggoogle cloud messaging
google cloud messaging
 
Google Cloud Messaging
Google Cloud Messaging Google Cloud Messaging
Google Cloud Messaging
 
GCM Android
GCM AndroidGCM Android
GCM Android
 
Максим Щеглов - Google Cloud Messaging for Android
Максим Щеглов - Google Cloud Messaging for AndroidМаксим Щеглов - Google Cloud Messaging for Android
Максим Щеглов - Google Cloud Messaging for Android
 
Firebase Cloud Messaging Device to Device
Firebase Cloud Messaging Device to DeviceFirebase Cloud Messaging Device to Device
Firebase Cloud Messaging Device to Device
 
FCM & GCM
FCM & GCMFCM & GCM
FCM & GCM
 
GCM Technology for Android
GCM Technology for AndroidGCM Technology for Android
GCM Technology for Android
 
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
 
Magda badita gcm
Magda badita  gcmMagda badita  gcm
Magda badita gcm
 
Push it! How to use Google Cloud Messaging in your Android App
Push it! How to use Google Cloud Messaging in your Android AppPush it! How to use Google Cloud Messaging in your Android App
Push it! How to use Google Cloud Messaging in your Android App
 
Push Notification for Android, iOS & Sever Side Using Firebase Cloud Messaging
Push Notification for Android, iOS & Sever Side Using Firebase Cloud MessagingPush Notification for Android, iOS & Sever Side Using Firebase Cloud Messaging
Push Notification for Android, iOS & Sever Side Using Firebase Cloud Messaging
 
Google App Engine's Latest Features
Google App Engine's Latest FeaturesGoogle App Engine's Latest Features
Google App Engine's Latest Features
 
Google App Engine
Google App EngineGoogle App Engine
Google App Engine
 
Google App Engine
Google App EngineGoogle App Engine
Google App Engine
 
What is Google App Engine
What is Google App EngineWhat is Google App Engine
What is Google App Engine
 
Google app engine introduction
Google app engine introductionGoogle app engine introduction
Google app engine introduction
 
Google cloud messaging
Google cloud messagingGoogle cloud messaging
Google cloud messaging
 
App Engine Overview @ Google Hackathon SXSW 2010
App Engine Overview @ Google Hackathon SXSW 2010App Engine Overview @ Google Hackathon SXSW 2010
App Engine Overview @ Google Hackathon SXSW 2010
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 
Google App Engine: An Introduction
Google App Engine: An IntroductionGoogle App Engine: An Introduction
Google App Engine: An Introduction
 

Similar to GCM with Pushbots

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
 
Android C2DM Presentation at O'Reilly AndroidOpen Conference
Android C2DM Presentation at O'Reilly AndroidOpen ConferenceAndroid C2DM Presentation at O'Reilly AndroidOpen Conference
Android C2DM Presentation at O'Reilly AndroidOpen ConferenceLars Vogel
 
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
 
A Google Cloud Solution Minus Dedicated Server - App Only (Server and Client)
A Google Cloud Solution Minus Dedicated Server - App Only (Server and Client)A Google Cloud Solution Minus Dedicated Server - App Only (Server and Client)
A Google Cloud Solution Minus Dedicated Server - App Only (Server and Client)Chinnayya Math
 
Android Cloud to Device Messaging with the Google App Engine
Android Cloud to Device Messaging with the Google App EngineAndroid Cloud to Device Messaging with the Google App Engine
Android Cloud to Device Messaging with the Google App EngineLars Vogel
 
Indicus Profile 2013
Indicus Profile 2013Indicus Profile 2013
Indicus Profile 2013samjoshi
 
IRJET- Displaying Smart Phone Data in the Desktop using Firebase
IRJET- Displaying Smart Phone Data in the Desktop using FirebaseIRJET- Displaying Smart Phone Data in the Desktop using Firebase
IRJET- Displaying Smart Phone Data in the Desktop using FirebaseIRJET Journal
 
Push-Notification
Push-NotificationPush-Notification
Push-NotificationAmey Ruikar
 
Real Time Tracking of Complete Transport System Using GPS
Real Time Tracking of Complete Transport System Using GPSReal Time Tracking of Complete Transport System Using GPS
Real Time Tracking of Complete Transport System Using GPSMit mysore
 
Smart Data Server for Smart Shops
Smart Data Server for Smart ShopsSmart Data Server for Smart Shops
Smart Data Server for Smart ShopsIOSR Journals
 
Automate+ Final Report
Automate+ Final ReportAutomate+ Final Report
Automate+ Final ReportSanat Maharjan
 
Android™ application development
Android™ application developmentAndroid™ application development
Android™ application developmentDeepika Chaudhary
 
CURRENT EVENT CLOUD COMPUTING
CURRENT EVENT CLOUD COMPUTING                                  CURRENT EVENT CLOUD COMPUTING
CURRENT EVENT CLOUD COMPUTING OllieShoresna
 

Similar to GCM with Pushbots (20)

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 ...
 
Android C2DM Presentation at O'Reilly AndroidOpen Conference
Android C2DM Presentation at O'Reilly AndroidOpen ConferenceAndroid C2DM Presentation at O'Reilly AndroidOpen Conference
Android C2DM Presentation at O'Reilly AndroidOpen Conference
 
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
 
A Google Cloud Solution Minus Dedicated Server - App Only (Server and Client)
A Google Cloud Solution Minus Dedicated Server - App Only (Server and Client)A Google Cloud Solution Minus Dedicated Server - App Only (Server and Client)
A Google Cloud Solution Minus Dedicated Server - App Only (Server and Client)
 
Android Cloud to Device Messaging with the Google App Engine
Android Cloud to Device Messaging with the Google App EngineAndroid Cloud to Device Messaging with the Google App Engine
Android Cloud to Device Messaging with the Google App Engine
 
Workshop: Android
Workshop: AndroidWorkshop: Android
Workshop: Android
 
Indicus Profile 2013
Indicus Profile 2013Indicus Profile 2013
Indicus Profile 2013
 
IRJET- Displaying Smart Phone Data in the Desktop using Firebase
IRJET- Displaying Smart Phone Data in the Desktop using FirebaseIRJET- Displaying Smart Phone Data in the Desktop using Firebase
IRJET- Displaying Smart Phone Data in the Desktop using Firebase
 
Push-Notification
Push-NotificationPush-Notification
Push-Notification
 
Real Time Tracking of Complete Transport System Using GPS
Real Time Tracking of Complete Transport System Using GPSReal Time Tracking of Complete Transport System Using GPS
Real Time Tracking of Complete Transport System Using GPS
 
Smart Data Server for Smart Shops
Smart Data Server for Smart ShopsSmart Data Server for Smart Shops
Smart Data Server for Smart Shops
 
GCM aperitivo Android
GCM aperitivo AndroidGCM aperitivo Android
GCM aperitivo Android
 
AutoMate+
AutoMate+AutoMate+
AutoMate+
 
Automate+ Final Report
Automate+ Final ReportAutomate+ Final Report
Automate+ Final Report
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Android™ application development
Android™ application developmentAndroid™ application development
Android™ application development
 
CURRENT EVENT CLOUD COMPUTING
CURRENT EVENT CLOUD COMPUTING                                  CURRENT EVENT CLOUD COMPUTING
CURRENT EVENT CLOUD COMPUTING
 
Suciu et al_rolcg_2015
Suciu et al_rolcg_2015Suciu et al_rolcg_2015
Suciu et al_rolcg_2015
 
Pravin New Resume
Pravin New ResumePravin New Resume
Pravin New Resume
 

GCM with Pushbots

  • 2. About me Research Scholar Developer cum Corporate Trainer at Xperia Technologies Pvt. Ltd. Workshop Event Organizer – National Android Development Challenge (NADC)
  • 3. What we will be discussing today. Google Cloud Messaging What is GCM? Why do we need GCM? How it is implemented ?
  • 5. GCM definition  GCM stands for Google Cloud Messaging .  It is a free service that allows developers to send data from third party servers to their applications running on android devices  Handles queuing of messages and delivery to the target application running on the target device.  Intended use is not to send huge amount of data to the client device
  • 6. Things to keep in mind Application on the android device DOES NOT need to be running to receive messages. Requires user to set up a Google account on the device. It is purely a routing component There is no guaranteed delivery of messages to the device .
  • 7. Focus of GCM Ease of use. No sign-up forms. No quotas. GCM stats are available through the Android Developer Console. Battery efficiency. Rich set of new APIs
  • 8. Difference between GCM and C2DM Simple API Key from Google APIs console page. Sender id is the project id rather than email address Supports data in JSON format and plain text
  • 9. Difference between GCM and C2DM Multicast message support Multiple senders Messages have time to live ( 0 ~ 4 weeks ) eg. Expiring invitations Payload up to 4kb
  • 10. Why do we need GCM?
  • 11. The need to use GCM  Client server architecture is the most common architecture .  Most application do all the heavy lifting and processing at the servers and then use the processed data within the applications .  Scalability & extensibility  More computing power  Background process polling server for information at regular intervals is a bad design  Battery performance  System resource usage ( memory , CPU )  Complicated coding
  • 12. The need to use GCM  Less coding required  Not need to worry about queuing of messages  Differed delivery  Simpler application flow  Application does not need to be running in the background for receiving data messages.  Lower cost and better tracking than SMS.
  • 13. How it is implemented?
  • 14. Major Components Your application server GCM servers Mobile device
  • 15. Typical sequence of events The application server sends a message to GCM servers. Google queues and stores the message in case the device is offline. When the device is online, Google sends the message to the device. On the device, the system broadcasts the message to the specified Android. This wakes the Android application up. The Android application processes the message
  • 16. 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 )
  • 17. Minimum requirements ( server side ) HTTPS application server that should be Able to communicate with your client. Able to fire off HTTP requests to the GCM server. Able to handle requests and queue data as needed. For example, it should be able to perform exponential back off. Able to store the user device registration id .
  • 18. PushBots application Creating GCM Sender ID Creating GCM API Key Add API Key to your PushBots Applicati on Create your Android project Impleme nt PushBots framewor k Send your first Push
  • 19. Snapshots 1 Creating GCM Sender ID Sender ID
  • 20. 2. Creating GCM API Key
  • 21. 3. Add API Key to your PushBots Application
  • 22. 4. Create your Android project
  • 24. 6. Send your first Push