Android Question libcore.io.ErrnoException: recvfrom failed: ETIMEDOUT (Connection timed out)

Rabbit

Member
Licensed User
Longtime User
Hi,

When I disable the WIFI connection, my application shows this message:

libcore.io.ErrnoException: recvfrom failed: ETIMEDOUT (Connection timed out)

I am using these library in my apps:

HTTP(1.36)
Network(1.25)
HttpUtils2Service


The message comes as ToastMessageShow on the screen from this code I think (PushService):
B4X:
Sub Service_Start (StartingIntent As Intent)

    If  CheckNetConnections <> -1 Then 
        Select StartingIntent.Action
            Case "com.google.android.c2dm.intent.REGISTRATION"
                HandleRegistrationResult(StartingIntent)
            Case "com.google.android.c2dm.intent.RECEIVE"
                MessageArrived(StartingIntent)
        End Select
    End If
End Sub

As you see I did added the CheckNetConnections but still the ugly message comes when I disable the WIFI connection.

B4X:
Sub CheckNetConnections As Int

    ' This sub will determine the WiFi and network connection.
   
    Dim Server As ServerSocket 
    Dim WiFi_IP As String
    Dim Network_IP As String
   
    Server.Initialize(21341,"Net")
    Network_IP = Server.GetMyIP
    WiFi_IP = Server.GetMyWifiIP
    Server.Close

    If WiFi_IP = "127.0.0.1" OR Network_IP = "127.0.0.1"  Then
        Return -1
    Else

        Return 0
    End If
   
   
End Sub


Any help pleas to hide this message completely
libcore.io.ErrnoException: recvfrom failed: ETIMEDOUT (Connection timed out)
 
Top