Capture photo automatically on android device.