i want to get Ftp folders list from server using AsyncTask and return folders names ArrayList to main class and update spinner adapter.
In main class i got spinner with
You already made your ArrayList static, make it public as well. and use that by your class name. and populate your ArrayList in onPostExecute(); like
protected void onPostExecute(ArrayList... result) {
if(YourClassName.directoriesTeacher.size()>0)
{
YourClassName.directoriesTeacher.clear();
}
YourClassName.directoriesTeacher.addAll(result);
}