• Forum
  • Lounge
  • Does Android app require an online serve

 
Does Android app require an online server

Currently working on a small android app on an emulator. The server I'm using is EasyPHP DevServer. I've been trying to connect to the server, but been getting error messages telling me there is a failed connection problem. I've been suspecting the reason why I'm having this problem is because the server is not online. From my understanding, EasyPHP DevServer is a development server used for development on the local machine only. Since its not online, is that the reason my android app has been failing to connect to it.

If it is, is there a way to put it online? Are there any alternatives?

Sorry if this comes off as a stupid question; pretty new to this area of development.
Depends on your network, really. You shouldn't really have to put it online anywhere.

For example, I can run a local server on some port of my iMac. I can access it via a browser on any other machine on my WiFi network and connect to it just fine.

I wonder if it's something to do with the network settings on the emulator or something like that? Do you have an actual device you could try that's connected to the same network as the machine running the server?

If you _did_ want to run online, accessible instances, you could spin up a small AWS micro EC2 instance. I think if you sign up for an AWS account then micro usage is more or less free for a year (based on hours per month).

This is all speculative, of course. Could be something completely different, so YMMV.
I keep getting:
 
E/ConcentratorExport: failed to connect to /192.168.1.152 (port 80): connect failed: ETIMEDOUT (Connection timed out)

as an error; when trying to connect to my EasyPHP server. What could be the problem?
Last edited on
Hard to tell.

Is the server running on port 80? I'm not familiar with EasyPHPServer, but I'd imagine there's some config somewhere that dictates what port it runs on.

Can you connect to the server from other devices? For example, can you connect via a different device on your network? If not, the problem is probably something to do with your server/host. If so, the it seems the problem is isolated to your emulator/client.
Last edited on
I figured out the problem. It turns out I have to change the IP address to 10.0.2.2, instead of what I had before. Thanks for the ideas MrHutch.
Topic archived. No new replies allowed.