I'm checking for internet connection status in onPreExecute() and If there is no internet connection, it should not execute the doInBackground() and onPostExecute()
new getStatus().execute();
private class getStatus extends AsyncTask<Void, Void, Void> {
You set a flag in the AsyncTask in onPreExecute. Check that flag in the other two functions, and immediately return if the flag is true.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With