Stack Overflow archive
1 scoreaccepted

Pass Integer[] to AsyncTask - Android

score
1
question views
2.3K
license
CC BY-SA 3.0

Change the parameters of your AsyncTask to <Integer[], Void, String[]>

java
public class DownLoaderTask extends AsyncTask<Integer[], Void, String[]> {

    ...

    protected String[] doInBackground(Integer[]... params) {
        ...
        Integer[] resourceIds = params[0];
        ...
    } 

    ...

}

Originally posted on Stack Overflow. Public user contributions are licensed under Creative Commons Attribution-ShareAlike.