Java client side code for the android app