Sample android code for learning from: http://libro.tuyano.com/index2?id=1005