title: How can I pass a primitive int to my AsyncTask?
body: <p>What I want it's to pass one <code>int</code> variable to my <code>AsyncTask</code>.</p>
  
  <pre><code>int position = 5;
  </code></pre>
  
  <p>And I declared my AsyncTask like this:</p>
  
  <pre><code>class proveAsync extends AsyncTask&lt;int, Integer, Void&gt; {
  
      protected void onPreExecute(){
      }
  
      protected Void doInBackground(int... position) {
      }
  
      .
      .
      .
  </code></pre>
  
  <p>But I got an error that it's the following:</p>
  
  <blockquote>
    <p>Type argument cannot be of primitive type</p>
  </blockquote>
  
  <p>I just could pass an <code>int[]</code> and <code>Integer</code> variables but never an <code>int</code> variable and I execute my <code>AsyncTask</code> like this:</p>
  
  <pre><code>new proveAsync().execute(position);
  </code></pre>
  
  <p>Is there something that I could do to pass only this <code>position</code>?</p>
  
  <p>Thanks in advance!</p>