Tarik Mokafih
Tarik Mokafih

Reputation: 1257

access my local server from my android virtual device?

I want to access a local server (installed on my machine ) trough my android virtual device, and i can't figure out how to do it ?

Upvotes: 1

Views: 2574

Answers (2)

Sergii Kudriavtsev
Sergii Kudriavtsev

Reputation: 10512

In addition to Nikola's answer - you should also be able to use an external ip address of your development machine.

Upvotes: 0

Nikola Despotoski
Nikola Despotoski

Reputation: 50548

You need to make HTTP POST/GET to the server, or create simple PHP GET if the server is running any PHP script. Read more about HTTP Post/Get.

Also read how can you access localhost on your machine http://developer.android.com/guide/developing/devices/emulator.html#networkaddresses

Also note that the address 127.0.0.1 on your development machine corresponds to the emulator's own loopback interface. If you want to access services running on your development machine's loopback interface (a.k.a. 127.0.0.1 on your machine), you should use the special address 10.0.2.2 instead.

Upvotes: 3

Related Questions