iOS Question check wifi or 3g


Well-Known Member
Licensed User
hi Erel

how can I check if there is line wifi or 3g in b4i!


Well-Known Member
Licensed User
I like to know if the user is connecting either by WiFi or 3G.

Lets say you are using the chat example and it opens a socket connection, but then the user turns off WiFi or the WiFi drops connection. Is there a way to detect if the WiFi has dropped and they are now using 3G/4G.

And if they are connected using 3G/4G to a socket and then they connect to a WiFi network. Is there a way to then detect if they are now connecting by WiFi.

Or is B4i (or iOS) smart enough to know the connection is now connecting by another method and keep the connection alive ?


Well-Known Member
Licensed User
Hi Erel
I used this code

Sub Wifi3gOnOff As Boolean
    Dim v As Application
    Dim b As Boolean = v.CanOpenURL("")
    wifi3gOn = b
    Return b
End Sub


Active Member
Licensed User
I would like to know if the app is connected wifi or 3G/4G.

If connected to wifi I will always download some image files, connected to 3G/4G I will ask user to download.

Is it possible to se what kind of connection I use?