SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Android, let’s chat!
Google Cloud Messaging


By
Maria Magdalena Bădiţa
I’m so lonely…
What is GCM?

                                       Push: lightweight message to
GCM (Google Cloud Messaging) is
                                       applications telling that there is
a free service that helps
                                       new data to be fetched from the
developers send data from servers
                                       server or a message containing
to their Android applications on
                                       up to 4kb of payload data (e.g:
Android devices.
                                       instant messaging apps).




                     This can eliminate continuous
                     query to server for updates
                     using background services
GCM Characteristics


  Allows 3rd-party                       GCM makes no
application servers to send              guarantees about delivery
messages to their Android                or the order of messages.
applications.




                    Application on an Android device
                    doesn't need to be running to
                    receive messages.
Device registration
Send the notification
Google API Console




1.Creating a Google API project

2.Enabling the GCM Service        http://developer.android.com/google/gcm/gs.html

3.Obtaining an API Key
Writing the Android Client I
Copy the gcm.jar file into your application classpath.
Writing the Android Client II

Write the my_app_package.GCMIntentService class




Write your application's main activity
Migration


Android Cloud to Device
Messaging (C2DM) is
deprecated.                  GCM replaces C2DM



                          The focus of GCM is as follows:
                            * Ease of use. No sign-up forms.
                            * No quotas.
                            * GCM and C2DM stats are available
                            through the Developer Console.
                            * Battery efficiency.
                            * Rich set of new APIs.
Client changes




Server changes
   Sending messages to GCM devices requires a few changes:

   * The request should be sent to a new endpoint:
   https://android.googleapis.com/gcm/send.

   * The Authorization header of the request should contain the
   API key generated during sign up. This key replaces the
   deprecated ClientLogin Auth token.
Resources

• http://developer.android.com/
• https://developers.google.com/events/io/
Thank you!!! Now I can
       chat with my Android
       friends! :)




Speaker.bio.toString(
)
      http://magdabadita.wordpress.com/

      Smartphone Platforms


      SmartphonePlatf

Weitere ähnliche Inhalte

Was ist angesagt?

Gcm presentation
Gcm presentationGcm presentation
Gcm presentationNiraj Singh
 
Firebase Cloud Messaging Device to Device
Firebase Cloud Messaging Device to DeviceFirebase Cloud Messaging Device to Device
Firebase Cloud Messaging Device to DeviceTakuma Lee
 
GOOGLE CLOUD MESSAGING PPT 2017
GOOGLE CLOUD MESSAGING PPT 2017GOOGLE CLOUD MESSAGING PPT 2017
GOOGLE CLOUD MESSAGING PPT 2017ketan Bordekar
 
GCM with Pushbots
GCM with PushbotsGCM with Pushbots
GCM with PushbotsAshish RAj
 
GCM Technology for Android
GCM Technology for AndroidGCM Technology for Android
GCM Technology for AndroidRanjitha R_14
 
google cloud messaging
google cloud messaginggoogle cloud messaging
google cloud messagingBhavana Sharma
 
20150902 v mworld2015-recap
20150902 v mworld2015-recap20150902 v mworld2015-recap
20150902 v mworld2015-recapKevin Groat
 
Exploring the continuum between Cordova and React Native
Exploring the continuum between Cordova and React NativeExploring the continuum between Cordova and React Native
Exploring the continuum between Cordova and React NativeSimon MacDonald
 
Lagom On Kubernetes
Lagom On KubernetesLagom On Kubernetes
Lagom On KubernetesKnoldus Inc.
 
Prolifics IBM Cloud Private Accelerators
Prolifics IBM Cloud Private AcceleratorsProlifics IBM Cloud Private Accelerators
Prolifics IBM Cloud Private AcceleratorsGreg Hodgkinson
 

Was ist angesagt? (14)

GCM for Android
GCM for AndroidGCM for Android
GCM for Android
 
google cloud messaging
google cloud messaginggoogle cloud messaging
google cloud messaging
 
Gcm presentation
Gcm presentationGcm presentation
Gcm presentation
 
FCM & GCM
FCM & GCMFCM & GCM
FCM & GCM
 
Firebase Cloud Messaging Device to Device
Firebase Cloud Messaging Device to DeviceFirebase Cloud Messaging Device to Device
Firebase Cloud Messaging Device to Device
 
Gcm tutorial
Gcm tutorialGcm tutorial
Gcm tutorial
 
GOOGLE CLOUD MESSAGING PPT 2017
GOOGLE CLOUD MESSAGING PPT 2017GOOGLE CLOUD MESSAGING PPT 2017
GOOGLE CLOUD MESSAGING PPT 2017
 
GCM with Pushbots
GCM with PushbotsGCM with Pushbots
GCM with Pushbots
 
GCM Technology for Android
GCM Technology for AndroidGCM Technology for Android
GCM Technology for Android
 
google cloud messaging
google cloud messaginggoogle cloud messaging
google cloud messaging
 
20150902 v mworld2015-recap
20150902 v mworld2015-recap20150902 v mworld2015-recap
20150902 v mworld2015-recap
 
Exploring the continuum between Cordova and React Native
Exploring the continuum between Cordova and React NativeExploring the continuum between Cordova and React Native
Exploring the continuum between Cordova and React Native
 
Lagom On Kubernetes
Lagom On KubernetesLagom On Kubernetes
Lagom On Kubernetes
 
Prolifics IBM Cloud Private Accelerators
Prolifics IBM Cloud Private AcceleratorsProlifics IBM Cloud Private Accelerators
Prolifics IBM Cloud Private Accelerators
 

Andere mochten auch

Andere mochten auch (6)

Alin miu google app engine(gae) v1.1
Alin miu google app engine(gae) v1.1Alin miu google app engine(gae) v1.1
Alin miu google app engine(gae) v1.1
 
Android Core Aula 7 - Aplicações (Services, Broadcast Receivers, NDK/JNI)
Android Core Aula 7 - Aplicações (Services, Broadcast Receivers, NDK/JNI)Android Core Aula 7 - Aplicações (Services, Broadcast Receivers, NDK/JNI)
Android Core Aula 7 - Aplicações (Services, Broadcast Receivers, NDK/JNI)
 
Mihai petrescu maad
Mihai petrescu   maadMihai petrescu   maad
Mihai petrescu maad
 
Introduction toandroid
Introduction toandroidIntroduction toandroid
Introduction toandroid
 
Atividades e Intenções (Android)
Atividades e Intenções (Android)Atividades e Intenções (Android)
Atividades e Intenções (Android)
 
Android: Intent, Broadcast Receiver e Notifications
Android: Intent, Broadcast Receiver e NotificationsAndroid: Intent, Broadcast Receiver e Notifications
Android: Intent, Broadcast Receiver e Notifications
 

Ähnlich wie GCM-Android, let's chat

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 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
 
我的GCM時代-推送訊息的實做分享
我的GCM時代-推送訊息的實做分享我的GCM時代-推送訊息的實做分享
我的GCM時代-推送訊息的實做分享Morning Kao
 
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
 
Push to Me: Mobile Push Notifications (Zend Framework)
Push to Me: Mobile Push Notifications (Zend Framework)Push to Me: Mobile Push Notifications (Zend Framework)
Push to Me: Mobile Push Notifications (Zend Framework)Mike Willbanks
 
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
 
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 Cloud2Device Messaging
Android Cloud2Device MessagingAndroid Cloud2Device Messaging
Android Cloud2Device MessagingMando Stam
 
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
 
4_pillars_for_app_development_in_GCP.pdf
4_pillars_for_app_development_in_GCP.pdf4_pillars_for_app_development_in_GCP.pdf
4_pillars_for_app_development_in_GCP.pdfLuillyfe Blanco
 
Android chat in the cloud
Android chat in the cloudAndroid chat in the cloud
Android chat in the cloudfirenze-gtug
 
ID Android TechTalk Series #6 : Google Service and Gradle - Andrew Kurniadi
ID Android TechTalk Series #6 : Google Service and Gradle - Andrew KurniadiID Android TechTalk Series #6 : Google Service and Gradle - Andrew Kurniadi
ID Android TechTalk Series #6 : Google Service and Gradle - Andrew KurniadiDicoding
 
勝手に改造 Chrome to Phone
勝手に改造 Chrome to Phone勝手に改造 Chrome to Phone
勝手に改造 Chrome to PhoneRyo Maruyama
 

Ähnlich wie GCM-Android, let's chat (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 ...
 
GCM aperitivo Android
GCM aperitivo AndroidGCM aperitivo Android
GCM aperitivo Android
 
Workshop: Android
Workshop: AndroidWorkshop: Android
Workshop: Android
 
AutoMate+
AutoMate+AutoMate+
AutoMate+
 
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
 
我的GCM時代-推送訊息的實做分享
我的GCM時代-推送訊息的實做分享我的GCM時代-推送訊息的實做分享
我的GCM時代-推送訊息的實做分享
 
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
 
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
 
Push to Me: Mobile Push Notifications (Zend Framework)
Push to Me: Mobile Push Notifications (Zend Framework)Push to Me: Mobile Push Notifications (Zend Framework)
Push to Me: Mobile Push Notifications (Zend Framework)
 
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
 
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 Cloud2Device Messaging
Android Cloud2Device MessagingAndroid Cloud2Device Messaging
Android Cloud2Device Messaging
 
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
 
4_pillars_for_app_development_in_GCP.pdf
4_pillars_for_app_development_in_GCP.pdf4_pillars_for_app_development_in_GCP.pdf
4_pillars_for_app_development_in_GCP.pdf
 
Android chat in the cloud
Android chat in the cloudAndroid chat in the cloud
Android chat in the cloud
 
Suciu et al_rolcg_2015
Suciu et al_rolcg_2015Suciu et al_rolcg_2015
Suciu et al_rolcg_2015
 
ID Android TechTalk Series #6 : Google Service and Gradle - Andrew Kurniadi
ID Android TechTalk Series #6 : Google Service and Gradle - Andrew KurniadiID Android TechTalk Series #6 : Google Service and Gradle - Andrew Kurniadi
ID Android TechTalk Series #6 : Google Service and Gradle - Andrew Kurniadi
 
勝手に改造 Chrome to Phone
勝手に改造 Chrome to Phone勝手に改造 Chrome to Phone
勝手に改造 Chrome to Phone
 

GCM-Android, let's chat

  • 1.
  • 2. Android, let’s chat! Google Cloud Messaging By Maria Magdalena Bădiţa
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. What is GCM? Push: lightweight message to GCM (Google Cloud Messaging) is applications telling that there is a free service that helps new data to be fetched from the developers send data from servers server or a message containing to their Android applications on up to 4kb of payload data (e.g: Android devices. instant messaging apps). This can eliminate continuous query to server for updates using background services
  • 14. GCM Characteristics Allows 3rd-party GCM makes no application servers to send guarantees about delivery messages to their Android or the order of messages. applications. Application on an Android device doesn't need to be running to receive messages.
  • 17. Google API Console 1.Creating a Google API project 2.Enabling the GCM Service http://developer.android.com/google/gcm/gs.html 3.Obtaining an API Key
  • 18. Writing the Android Client I Copy the gcm.jar file into your application classpath.
  • 19. Writing the Android Client II Write the my_app_package.GCMIntentService class Write your application's main activity
  • 20. Migration Android Cloud to Device Messaging (C2DM) is deprecated. GCM replaces C2DM The focus of GCM is as follows: * Ease of use. No sign-up forms. * No quotas. * GCM and C2DM stats are available through the Developer Console. * Battery efficiency. * Rich set of new APIs.
  • 21. Client changes Server changes Sending messages to GCM devices requires a few changes: * The request should be sent to a new endpoint: https://android.googleapis.com/gcm/send. * The Authorization header of the request should contain the API key generated during sign up. This key replaces the deprecated ClientLogin Auth token.
  • 23.
  • 24. Thank you!!! Now I can chat with my Android friends! :) Speaker.bio.toString( ) http://magdabadita.wordpress.com/ Smartphone Platforms SmartphonePlatf