Android app code for data collection