title: Android wait to write SQLite query
body: <p>Im uploading an image to my server and so what I want to do is, while its uploading, 
  1) Write data to SQLiteDatabase
  2) Once upload is complete write some more data to additional columns</p>
  
  <p>But if the upload is complete, but its still in stage 1; I want it to wait till (1) is completed before writing the additional data. </p>
  
  <pre><code>//Write data to SQLIte table 
  writeBeforeSave();
  
  public void onUploadCompleteCallback()
  {
     //If writeBeforeSave is complete execute; else wait till its finished
     writeAfterSave();
  }
  </code></pre>