This library was inspired and based on WaitForTheInternet by César Pérez https://github.com/ouvigna/WaitForTheInternet Your application will be able to get through an event, as it connects to the internet via Wifi or 3G, without the need to be checking all the time, not consuming battery...
Any experience in using on the later versions of android
Also using this library does it drain bayttery ?
I know I'm late here, but checking for internet is really easy, doesn't really require any special libraries. Just throw a ping to 184.108.40.206 (Google's permanent DNS server). Very reliable, works great, very simple. Only libraries I'm using are Core and Phone. Here's my code, works very well in the app I wrote in B4a v8.8, but there are many code examples on here that use this similar approach to pinging Google's 220.127.116.11:
In Process Globals:
Dim SB as StringBuilder
' Show main menu only if internet connectivity test successful, otherwise ExitApplication
If Ping("18.104.22.168", "Status", 5, 10, True) = "Offline" Then
Msgbox("No active internet connection detected. Turn off airplane mode if enabled, otherwise check cell data service or WiFi connectivity.","Connection Failed")
blOnlineCheckPassed = True ' my own variable used elsewhere
' Close this screen