iOS Question check wifi or 3g

ivanomonti

Well-Known Member
Licensed User
hi Erel

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

aaronk

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 ?
 

ivanomonti

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

B4X:
Sub Wifi3gOnOff As Boolean
    Dim v As Application
    Dim b As Boolean = v.CanOpenURL("https://www.google.it")
    wifi3gOn = b
    Return b
End Sub
 

mrossen

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?

Mogens
 
Top