Author Archives: hani.hmk

Android Google Cloud Messaging Tutorial

android-gcm-archGoogle Cloud Messaging for Android (GCM) is a push-notification-like service freely provided by Google. Simply, it allows you to send data from one-end “we will call it a GCM server” to GCM clients e.g. Android app.

This service can be used to send notifications or messages containing up to 4Kb of payload data. The GCM service takes care of messages queueing and delivery to the target application. GCM is completely free no matter how big your messaging needs are, and there are “so far” no quotas.

Continue reading

Android | Cleaner HTTP AsyncTask

android-http-get_2 HTTP AsyncTask is a commonly needed function in most Android app. So it is better to have a generic and reusable piece of code that can take care of the HTTP AsyncTask process whenever you need it. This will save your time and make your business code cleaner. Here we will see a suggested way to build such generic and reusable code.

Continue reading

Creating Server API Key to Send Message From Our Server to Google Cloud Messaging Service

server-gcm-server-api-keyWhen sending a message from your own HTTP server to Google cloud messaging server, you need to authenticate using Server API Key. This API Key can be created from the Developer Console. The Key will be appended into the POST request headers as a custom header. Read more about Authentication

Continue reading