title: Android : how to execute AsyncTask?
body: <p>I have to load XML data in my app, I'm doing that in a subclass of my activity class extending AsyncTask like this :</p>
  
  <pre><code>public class MyActivity extends Activity {
  
      ArrayList&lt;Offre&gt; listOffres;
  
      private class DownloadXML extends AsyncTask&lt;Void, Void,Void&gt;
      {
          protected Void doInBackground(Void... params)
          {
              listOffres = ContainerData.getFeeds();
              return null;
          }
      }
  
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          requestWindowFeature(Window.FEATURE_NO_TITLE);
          setContentView(R.layout.activity_liste_offres);
  
          DownloadXML.execute(); // Problem here !
  
          for(Offre offre : listOffres) { // etc }
      }
  }
  </code></pre>
  
  <p>I don't know how to use execute() here, I have the following error :</p>
  
  <blockquote>
    <p>Cannot make a static reference to the non-static method execute(Integer...) 
    from the type AsyncTask</p>
  </blockquote>
  
  <p>I guess some parameters but what ?</p>
  
  <p>Thank you. </p>