When your application needs to present content in the offline mode, it is necessary to download data from the Internet and store them on the device. Of course, such content could consist of text, images, or even movies. However, how can you download images and movies, as well as save them in a device? You will learn it in this recipe.
As an example, you will create a page with the Download a photo button. After clicking on it, you will download a file from a given address and save locally. Of course, you will also handle a scenario when a user does not have an Internet connection or when a remote file does not exist.