I personally use MLWifi when managing my WiFi networks, I then use WiFiNetworks.isOnLine to test if I'm on the internet or not. You can also use ServerSocket and test if you current IP address is 127.0.0.1, if it is then you are not on the internet.
I don't believe in using google or any other website for that fact just to see if you are online when there are plenty of tools/libraries for B4A to do that for you