I tried this code (Along with a lot of other things but this works for all three)
Dim IP As ServerSocket
Dim myIp As String = IP.GetMyIP
IP.Close
Return myIp
All return a valid looking IP if they are connected. However if I turn off the WIFI on each device, or don't connect to a router I get the following.
B4J: fe80:0:0:0:9d4c:3fa6:46:857%wlan0
B4i: 127.0.0.1
B4A: 26.0.28.37
Initializing ServerSocket makes no difference and as I understand it is not necessary to get the ip.
I seem to vaguely remember 127.0.0.1 from my bouts with wifi a few years ago on android. That meant you were not connected. But now I get 26.0.28.37?
So, my question is really this:
Is this the code I should be using to verify that the user is connected to a network and if so,
What do I look for to know when they are not connected?
B4i I think I get - if it is 127.0.0.1 then not connected.
B4J - Do I parse it to see if it is in valid ipv4 format?
B4A I am lost. Is 26.0.28.37 the new 127.0.0.1 for android?
Thanks for your help.