I'm registering for android.net.conn.CONNECTIVITY_CHANGE
and I'm getting the WIFI connect / disconnect events
but only the mobile disconnect event
even when I'm connected to the 3g or 4g network - I can see that using the this code - can someone explain ?
B4X:
Dim ss As ServerSocket
Dim ip,wifiIP As String
ip = ss.GetMyIP()
wifiIP = ss.GetMyWifiIP()
If (ip <> wifiIP AND ip <> "127.0.0.1" AND ip <> "") Then
Log ("My Mobile 3g/4g Ip is:" & ip)
Return ip
End If
Log ("not connected to Mobile network: ip=" & ip & " WifiIP=" & wifiIP)
Return ""
the events I'm getting are: (from the phone library)
Sub PE_ConnectivityChanged( networkType As String, State As String, Intent As Intent)
Log ("In PE_ConnectivityChanged: " & networkType & ", state = " & State & " Intent=" & Intent)
Log("PE_ConnectivityChange intent Extra:" & Intent.ExtrasToString)
yes service is running, and I get multiple disconnect events all with the same data (intent) but no connect event - but the phone is connected to the mobile network