According to AsyncTask, its
AsyncTask
- Params, the type of the parameters sent to the task upon execution.
- Progress, the type of the progress units published during the
background computation.
- Result, the type of the result of the background computation.
So if you want to pass void in doInBackground just pass void in place of Params.
Example code:
class DownloadLink extends AsyncTask {
@Override
protected Void doInBackground(Void... params) {
// TODO Auto-generated method stub
//Do Your stuff here..
return null;
}
}
And call it as:
new DownloadLink().execute();