Server side code of the Android retrieval system