What I want is to pass one int variable to my AsyncTask .
int position = 5;
And I declared my AsyncTask as follows:
class proveAsync extends AsyncTask<int, Integer, Void> { protected void onPreExecute(){ } protected Void doInBackground(int... position) { } . . .
But I got an error message:
A type argument cannot be a primitive type.
I can just pass the int[] and Integer variables, but never the int variable, and I execute my AsyncTask as follows:
new proveAsync().execute(position);
Is there anything I could do to convey just this position ?
Thanks in advance!
source share