I am looking for something similar, like this: http://stackoverflow.com/questions/2789612/how-can-i-check-whether-an-android-device-is-connected-to-the-web, but it should work also with libGDX.
Or using a codein libGDX like this for native android:
WifiManager wifi = (WifiManager) this.context.getSystemService(Context.WIFI_SERVICE);
boolean b=wifi.isWifiEnabled();