There is, likely, an Exception
being thrown within the doInBackground
method, which is, obviously, causing it to exit.
In your done
method, even if it returns nothing, you should call get
to ensure that nothing went wrong during the execution of the doInBackground
method
@Override
public void done() {
try {
get();
output.setText("Done!");
} catch (InterruptedException | ExecutionException ex) {
ex.printStackTrace();
output.setText("Bad: " + ex.getMessage());
}
}