title: How to make a dynamic execute of an AsyncTask?
body: <p>There is an <code>AsyncTask</code> which will post data to a webserver. The number of parameters to put in the <code>execute</code> method is dynamic because it depends on the number of rows updated inside the SQLite database table. Here is how I call the execute method :</p>
  
  <pre><code>ArrayList&lt;String&gt; t_enregs = new ArrayList&lt;String&gt;();
  t_enregs = db.getAllNewOrUpdatedParcelles(); // retrieving and formatting updated database rows
  if (t_enregs.size() &gt; 0) {
      tacheSend = new SendTask(SyncActivity.this);
      String parametres = "", sep = "";
      for (String enreg : t_enregs) {
          parametres += sep + enreg;
          sep = ",";
      }
      tacheSend.execute(parametres); // I want to make a dynamic call like execute("param1" , "param2")
  }
  </code></pre>
  
  <p>I debugged it and it gives 1 as the dimension of the <code>params</code> parameter of the <code>doInBackground</code> method ! So how to make a dynamic call to the <code>execute</code> method in this case ?</p>