I have a B4J server running that I want to sent a message to from a B4A app, then have the server respond with a Firebase Cloud Message (FCM). I've tested the FCM between the server & client app & it all works fine - however the problem I'm having is that when I try to connect to the B4J server from the B4A app using HttpJob.PostString, nothing happens for a while, then I get the following message in the log:
Both the device that the B4A app is running on & the PC that the B4J server is running on are connected to my local network. If I go into Chrome & type in:
The B4J app log shows me that a connection has been made, however when I execute:
from the B4A app, I get the connection timeout message. The "link" parameter in the PostString call is a global string variable set to "http://192.168.1.7:51044/message" & I have verified that this is correct by copying & pasting it into Chrome & seeing that it connects with the server.
Any ideas why Chrome connects but the app times out? Fyi, I have tried using localhost & 127.0.0.1 & they both work in Chrome, but fail in the app (with a connection refused message).
Thanks - Colin.
Error: org.apache.http.conn.ConnectTimeoutException: Connect to .. timed out
Both the device that the B4A app is running on & the PC that the B4J server is running on are connected to my local network. If I go into Chrome & type in:
The B4J app log shows me that a connection has been made, however when I execute:
B4X:
Dim j As HttpJob
j.Initialize("send string", Me)
j.PostString(link, request)
from the B4A app, I get the connection timeout message. The "link" parameter in the PostString call is a global string variable set to "http://192.168.1.7:51044/message" & I have verified that this is correct by copying & pasting it into Chrome & seeing that it connects with the server.
Any ideas why Chrome connects but the app times out? Fyi, I have tried using localhost & 127.0.0.1 & they both work in Chrome, but fail in the app (with a connection refused message).
Thanks - Colin.