title: Android web service call asynchronously every 5 seconds
body: <p>I want to call one web service after every 5 seconds in 1 min. Means in 1 min i want to call webservice 12 times. I want to do this asynchronously.</p>
  
  <pre><code>class AddStringTask extends AsyncTask&lt;Void, String, Void&gt; {
  
      private final ProgressDialog dialog = new ProgressDialog(HomeScreen.this);
  
      protected void onPreExecute() {
  
      }
  
      protected Void doInBackground(Void... unused)
      {
  
          return(null);
      }
  
      @Override
      protected void onPostExecute(Void unused) {
  
            this.dialog.dismiss();
  
      }
  }
  </code></pre>
  
  <p>I know this can be done with this code. bt doinbackground only executes once. I can not implement timer also in doInBackground method.</p>