I am using a Macbook pro M1 and Xojo 2023r4
Just for the pourpose of this post in order to simplify the explanation of my problem, I had created a middleware in order to work as a web service communication software in a Server to serve an Android App.
To debug the Android App I run the middleware in my Mac as Localhost in the port 8080
I also wrote a Desktop App as a testing App of the middleware.
And I simplified the code to minimun for this communication testing and example.
The code of the middleware for the Web Service includes:
The handleURL event:
Thanks Wayne…
To be clear: the web service IS running on my machine, the same one that is running the android App and the emulator…
That is why I am calling the localhost = 127.0.0.1
And as you see in my post the desktop app is working fine in the same machine against the same web server app.
May be you are saying me that emulator do not work with a localhost web service ??? Is that what you suggest ???
The emulator creates its own entire environment. 127.0.0.1 inside the emulator is localhost on the device inside the emulator. It is not your development machine.
You can do more reading on this matter by using your favorite search engine. Unfortunately I don’t have any reference material for you, I simply recall this having come up before (and doing my own searching then).
If I’m remembering correctly, there’s a setting on the emulator for what the local address of the host is.
@Tim_Parnell & @Wayne_Golding … I catch now what you both said about the way emulator works… I will try to find a solution for this if that solution exists…
Found and solved… for any that wants to try something similar that what I am doing, emulator uses IP http://10.0.2.2:8080 instead of localhost or 127.0.0.1