title: Refresh data Android application
body: <p>I made an android application that brings information using a web service, then when the application starts I put the data in a sqlite and I manage everything from my database.  After the application starts the data fills a tablelayout.</p>
  
  <p>Now I want to REFRESH that content every 20 seconds (Because information from webservice could changed).</p>
  
  <p>How can I do this? I used the onResume method, but I don't want to refresh content every time you went back to the tablelayout.</p>
  
  <p>So what I want to do is to execute the oncreate method (which connect with a webservice, fills my tablelayout and display it) every 20 seconds. I read about timer or handler but I'm not sure how can I do this.</p>
  
  <p>Now i have a problem!</p>
  
  <p>i get data from web service and insert data in database in my doInBackground.. thats ok. Now, i create all textviews, the tablerows, etc in the onPostExecute method, but i have 2 problems.
  First, </p>
  
  <p><code>UsuariosSQLiteHelper usdbh =
                              new UsuariosSQLiteHelper(this, "DBIncidentes", null, 1);</code></p>
  
  <p>I have a context problem there, in the doInBackground method</p>
  
  <p>and in onPostExecute method, i have the same problem with all the "this" , like <code>TableRow rowTitulo = new TableRow(this);</code></p>
  
  <p>i know this is a context error, i know basically how context works, but i dont know how to resolve this context problem. i thought that initializing a context in the async constructor may help and i replace in the onpost..   please help! </p>