Android messaging mechanism – C2DM and GCM

One of the issues of using CLOUD is not of polling info – this we know to do using SOAP or REST on top of web servers etc.

But how do we know that we need to get data? One alternative is by polling on the Web service all the time asking if something changed. This is bad for few reasons:

  1. Usage of battery.
  2. Usage of bandwidth.
  3. Server resources (CPU, RAM)

Android provide us with a unique mechanism – C2DM! This is defined by google as:

Android Cloud to Device Messaging (C2DM) is a service that helps developers send data from servers to their applications on Android devices. The service provides a simple, lightweight mechanism that servers can use to tell mobile applications to contact the server directly, to fetch updated application or user data. The C2DM service handles all aspects of queueing of messages and delivery to the target application running on the target device.

You can find short explanation over here:

http://amsanjeev.wordpress.com/2011/09/19/an-introduction-to-c2dm-part-1/

http://amsanjeev.wordpress.com/2011/09/19/c2dm-workflow-explained/

 

This is also deprecated so now google recoomend GCM which is:

Google Cloud Messaging for Android (GCM) is a service that helps developers send data from servers to their Android applications on Android devices. This could be a lightweight message telling the Android application that there is new data to be fetched from the server (for instance, a movie uploaded by a friend), or it could be a message containing up to 4kb of payload data (so apps like instant messaging can consume the message directly). The GCM service handles all aspects of queueing of messages and delivery to the target Android application running on the target device.

http://developer.android.com/guide/google/gcm/index.html

And here is a simple tutorial:

http://fundroiding.wordpress.com/2012/06/29/google-cloud-messaging-for-android-gcm-simple-tutorial/

Posted in android, servers, Uncategorized | Leave a comment

What server to pick for my app??? (Google App engine)

My first thought when I looked for servers for my new APP was the AMAZON servers (http://aws.amazon.com/), but then a friend pointed out this google service, which is cheaper, and if its suits our needs, it may be a better choice – Continue reading

Posted in Google app engine, servers, Uncategorized | Leave a comment

Knockout – jquery plugin

Knockout –

Today I came across a very nice and neat module – knockout.js. The module is light weighted and easy to use, and simplify binding of data to objects and the management of the UI:

It offers:

Continue reading

Posted in jquery, Uncategorized | Leave a comment

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

Posted in Uncategorized | 1 Comment