Hello, when my Async task is executed it completely crashes the app Here is the code to the class. It sits inside of my main activity class. I'm new to threading, so sorry if I've done something ridiculous lol, I don't fully understand it.
EDIT:
private class TeamSearchTask extends AsyncTask<String,Void,Void> {
CharSequence nfo;
String [] matches;
protected Void doInBackground(String... teamNumber)
{
//Team information ------------------------------------------------------------------------------------
//Array of team data
String [] data = APIconnection.getTeams(teamNumber[0], "");
//Display basic team info
nfo = ("\nFormal Team Name:\n" + data[1] +
"\n\nLocation:\n" + data [3] + ", " + data[4] + ", " + data[5] +
"\n\nRookie Year:\n" + data[6] +
"\n\nRobot Name:\n" + data[7] +
"\n\nWebsite:\n" + data[8] + "\n\n\n\n\n\n\n\n\n");
//Make match archive --------------------------------------------------------------------------------------
String [] events = APIconnection.getEventIdsByYear(year1);
String [] matches = new String [(events.length*11)];;
for (int i = 0; i<events.length; i++)
{
matches[(i*11) + i] = APIconnection.getMatches2(teamNumber[0], events[i] ,"","")[i];
}
return null;
}
protected void onProgressUpdate(Void...voids )
{}
protected void onPostExecute(Void result) {
info.setText(nfo);
matchArchive(matches);
}
}