I have implemented android code to get InputStream from webservices and for that I have used AsyncTask
. But I cannot understand what is the use of the argument "String... urls
" in doInBackground()
method. Can anybody explain this? Following is my code for that:
private class DownloadWebpageTask extends AsyncTask<String, Void, String> {
@Override
protected String doInBackground(String... urls) {
try {
return downloadUrl(urls[0]);
} catch (IOException e) {
urlText.setText("");
return "Unable to retrieve web page. URL may be invalid.";
}
}