@@ -0,0 +1,312 @@
+public boolean isOnline()%7B%0A%0A%09final ConnectivityManager conMgr = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);%0A%09final NetworkInfo activeNetwork = conMgr.getActiveNetworkInfo();%0A%09%0A%09if (activeNetwork != null && activeNetwork.isConnected()) %7B%0A%09    return true;%0A%09%7D else %7B%0A%09%09return false;%0A%09%7D%0A%7D%0A

Create checkonline.java