handle requests in android main thread