Category Archives: Android

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

Add Google Maps v2 to Android App

android-map-v2-on-emulatorGoogle provides a service to integrate Map to Android App. Google Maps Android API, can be used to add maps to your application. The API provides functions to handle the access to Google Maps servers, data downloading, map display, and response to map gestures.

The latest release of the API “Google Maps Android API v2″, allows you to add maps into an activity as a fragment with a simple XML snippet.

Continue reading

Configuring Android Emulator to Run Google Map v2

android-map-v2-on-emulatorRunning Android Google Map v2 on emulator is not straight-forward. Google Map v2 is “so far” not running on the default emulator even if you try all the options e.g. changing the target “Android API x” or “Google API”.

The only “relatively easy” solution is to manually install two apk “Google Play services & Google Play store” files on the emulator.

 

 

 

Continue reading