title: Downloading an XML file on Android, storing it and then using it locally
body: <p>I am a beginner in Android programming, and am working on an app that shows a list of products, and onclick, a new activity shows the details about that particular product.</p>
  
  <p>This list of products is stored online as an xml file, with the obvious problem that the device needs to be connected to the internet every time it is used. I want the device to work offline as well.</p>
  
  <p>One way to do it will be to store the latest xml locally. But my products will get updated very often. How do I keep my local copy of the xml file updated? And also, how do I check for updates when internet is available to the device? I would like both these processes, i.e checking for internet and updating local file to run in the background, while the latest-but-one (the local xml file) is still displayed on screen.</p>
  
  <p>Apologies if this question is vague. I would be glad to add more details if required.</p>