Updated API and android code