There is often a scenario where you need to download files from a server onto the Android device. This needs to be done without forcing the user to launch a web browser and have interaction as some of the downloaded data might be private. Let’s use the scenario where you’ve made a game and you have in-app purchases. You want to keep the size of the game small for everyone so you decide to put the purchase items on your server. When a user purchases an item then the item will be downloaded in the background. This is a perfect usage example.
For purposes of the tutorial we will be staying simple. We will be downloading a remote image in the background and then displaying it when it has finished downloading.