title: Android: Insert the data into the local db only once when app launch
body: <p>I have two queries:</p>
  
  <ol>
  <li><p>I want to insert the data from the web services into the local SQLite DB. I want to insert this data only once then the next time it will not loaded from the web services. 
  I have tried using Static variable but that didn't worked. </p>
  
  <p>static int UpdateOneTime=0;</p>
  
  <p>if (UpdateOneTime==0) {                </p>
  
  <p>getData();</p>
  
  <p>UpdateOneTime++;</p>
  
  <p>}</p></li>
  <li><p>If I want to reload the data again means when app start every time it will get the data from the server and insert into the DB by just deleting the previous data in the table. 
  I have tried by just calling the <code>onUpgrade(SqliteDatabase db, int oldversion,int newversion);</code> 
  But it didn't worked. So how to solve these two issues. Suggest me something.</p></li>
  </ol>