I have this asynctask working fine for what I want with a single argument (remove the param2 and it runs) but as soon as I attempt to add the 2nd argument I receive:
Syntax error on token "param2", VariableDeclaratorId expected after this token
which to be honest, I've never come across.
The function is below (havent included the parameters as I know they've worked in other functions and do work when used individually, but as a pair....) I believe I may be trying to add them incorrectly?
Do I need to make them into an array and use the array as a parameter? If so, how would I go about it? (Still getting the hang of android!)
My function
private class LoadList extends AsyncTask<String, Void, ArrayList<List>> {
private Exception exception = null;
/**
* Main worker method
*/
protected ArrayList<List> doInBackground(String... param1, param2) {
try {
//Call web service
return Utils.getWebService(getApplicationContext()).getListInfo(param1[0], param2[1]);
} catch (Exception e) {
exception = e;
return null;
}
}
}
If any more is needed let me know, please, and thank you!