Motion Detection and Handling Android App