File tree Expand file tree Collapse file tree
HowToDetectInternetConnectivityInAndroid Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,16 +77,16 @@ public void onPreExecute() {
7777 * Returns the result from doInBackground and notifies the MainActivity on the main thread.
7878 * <_, _, String> in the AsyncTask declaration.
7979 *
80- * @param String result : returned from the doInBackground method.
80+ * @param String response : returned from the doInBackground method.
8181 */
82- public void onPostExecute (String result ) {
82+ public void onPostExecute (String response ) {
8383 String status = "Online" ;
8484 // Not a long term solution, but one technique could be to check for (UnknownHostException).
85- if (result .contains ("UnknownHostException" )) {
85+ if (response .contains ("UnknownHostException" )) {
8686 status = "Offline" ;
8787 }
8888 this .mainActivityInterface .notifyMainActivity ("Connection Status: " + status ,
89- result );
89+ response );
9090 }
9191
9292}
You can’t perform that action at this time.
0 commit comments