use android service to replace thread for main activity