title: Updating database while app is running
body: <p>So, this is what my app is doing. I have a file on the internet with a list of locations. I'm loading that file and saving locations at database on my phone. Also, on every 24 hours I am dowloading that same file and checking if it has some updates. What I want to do is next: I want to put in that file current version of the file, and when I download it I check that version with the previous one and if they are different, I want to drop my current table, and load all locations again.</p>
  
  <p>Currently, my app is doing following: I have a alarm which triggers the IntentService which then downloads the file and checks for each location if it is in the database, and if it is not, then it inserts it.</p>
  
  <p>I want: IntentService first to check if the version of the file downloaded is different from the previous one, and if it is, drops the table, and inserts all locations from the file in new table.</p>
  
  <p>I'm managing my database with ContentProvider and SQLiteOpenHelper.
  I guess I should somehow trigger the onUpgrade method of the SQLiteOpenHelper, but I don't know how to exactly do this.</p>
  
  <p>Any help would be appreciated.</p>