0

I am testing my android app which connects to MySQL server installed on my machine. Everything is working fine If I use Emulator for testing. But when I connect my Android Tablet (through USB cable)it gives HTTP error

 HTTP problem or the connection was aborted org.apache.http.conn.HttpHostConnectException: Connection to http://192.168.1.9:3000 refused

While testing with emulator I have given my machine's local IP i.e. 192.168.1.9. I searched a lot on web but couldn't get how to have my tab post a request on my DB. One of the posts mentioned to change host file of tab but couldn't locate the host file for editing. Please advise. Thanks.

Gaurav
  • 535
  • 1
  • 8
  • 28
  • Is your tabled connected to the same network as your machine? Because if you try to access your local machine and your table is connected on your carrier network this is never going to work just like that. See this [post](http://stackoverflow.com/questions/4779963/how-can-i-access-my-localhost-from-my-android-device) for more information – Cosmin Ionascu Aug 13 '13 at 14:47
  • Thanks. Tried after reading the post. its working now. thanks again. – Gaurav Aug 14 '13 at 07:13

1 Answers1

0

I suppose that your wifi hub have all ports opened.

Oscar Fernandez
  • 144
  • 1
  • 3
  • 11