Android Code Snippet B4X Check Internet available + type (WiFi/Cell/LAN) + IsValidIP + IsValidURL

SOLUTION HERE


Class version

I share with you this code that works in B4A, B4I and B4J.

Requires B4A -> Network, B4I -> iNetwork, or B4J -> jNetwork

If you use this class you will be able to know if there is an active Internet connection, type of connection and the IP number.
In the case of B4J the only connection type is LAN, for B4I and B4A you can get whether it is WIFI or CELL.
You can also check if an IP is valid using IsValidIP(IP As String). It can be IPv4 or IPv6

...
 
Last edited:
Top