Hello, I have the following problem. In a Activity
I have a button that executes a AsyncTask
. The problem is that if the app is completely closed, the operation is not executed.
Is it possible to call an Asynchronous method when applications are closed? I was testing with the onDestroy
method in my Activity
in this way:
@Override
protected void onDestroy() {
Toast.makeText(this, "onDestroy", Toast.LENGTH_LONG).show();
super.onDestroy();
}
But he does not show me the Toast message when he closes it. Am I implemented poorly? Thanks in advance.