Your SlideShare is downloading. ×
Magda badita  gcm
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
254
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
23
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Android, let’s chat!Google Cloud MessagingByMaria Magdalena Bădiţa
  • 2. I’m so lonely…
  • 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. 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. Device registration
  • 6. Send the notification
  • 7. Google API Console1.Creating a Google API project2.Enabling the GCM Service http://developer.android.com/google/gcm/gs.html3.Obtaining an API Key
  • 8. Writing the Android Client ICopy the gcm.jar file into your application classpath.
  • 9. Writing the Android Client IIWrite the my_app_package.GCMIntentService classWrite your applications main activity
  • 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. Client changesServer 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.
  • 12. Resources• http://developer.android.com/• https://developers.google.com/events/io/
  • 13. Thank you!!! Now I can chat with my Android friends! :)Speaker.bio.toString() http://magdabadita.wordpress.com/ Smartphone Platforms SmartphonePlatf