Android Question java.net.SocketTimeoutException on local network

mcombatti

New Member
Licensed User
Hello,

The following code snippet successfully retrieves data from remote servers. Upon attempting to access from the local network as http://192.168.1.4:8080, (or any port) the SocketTimeoutException error is thrown. The URL is accessible from the device's web browser without any issues. Is something required to access a local network resource?

B4X:
Dim j As HttpJob
    j.Initialize("", Me)
    j.Download("http://192.168.1.4:8080/api/test")
    Wait For (j) JobDone(j As HttpJob)
    If j.Success Then
        Log(j.GetString)
        Return j.GetString
    Else
        Log(j.ErrorMessage)
        Return j.ErrorMessage
    End If
    j.Release

Thanks for the help!
 
Top