Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Magda badita gcm


Published on

  • Be the first to comment

  • Be the first to like this

Magda badita gcm

  1. 1. Android, let’s chat!Google Cloud MessagingByMaria Magdalena Bădiţa
  2. 2. I’m so lonely…
  3. 3. What is GCM? Push: lightweight message toGCM (Google Cloud Messaging) is applications telling that there isa free service that helps new data to be fetched from thedevelopers send data from servers server or a message containingto 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
  4. 4. GCM Characteristics Allows 3rd-party GCM makes noapplication servers to send guarantees about deliverymessages to their Android or the order of messages.applications. Application on an Android device doesnt need to be running to receive messages.
  5. 5. Device registration
  6. 6. Send the notification
  7. 7. Google API Console1.Creating a Google API project2.Enabling the GCM Service an API Key
  8. 8. Writing the Android Client ICopy the gcm.jar file into your application classpath.
  9. 9. Writing the Android Client IIWrite the my_app_package.GCMIntentService classWrite your applications main activity
  10. 10. MigrationAndroid Cloud to DeviceMessaging (C2DM) isdeprecated. 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.
  11. 11. Client changesServer changes Sending messages to GCM devices requires a few changes: * The request should be sent to a new endpoint: * The Authorization header of the request should contain the API key generated during sign up. This key replaces the deprecated ClientLogin Auth token.
  12. 12. Resources••
  13. 13. Thank you!!! Now I can chat with my Android friends! :) Smartphone Platforms SmartphonePlatf