First time to use github, this is the code from Android sample