Commit 30614c4b authored by narinder Rana's avatar narinder Rana
Browse files

refine code

parent fa2349ea
Pipeline #139790 passed with stage
in 2 minutes and 29 seconds
......@@ -26,6 +26,8 @@ public class ConnectivityReceiver
}
public static boolean isConnected() {
try {
String command = "ping -c 1 ecloud.global";
return Runtime.getRuntime().exec(command).waitFor() == 0;
......@@ -51,7 +53,7 @@ public class ConnectivityReceiver
isConnected = activeNetwork != null
&& activeNetwork.isConnectedOrConnecting();
Log.e(TAG, "connectivityReceiverListener...." + isConnected());
Log.e(TAG, "connectivityReceiverListener..." + isConnected());
if (connectivityReceiverListener != null) {
connectivityReceiverListener.onNetworkConnectionChanged(isConnected);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment