Android code to detection motion by comparing two images.