test the localhost in android emulator

AndroidStrutsLocalhost

Android Problem Overview


My web application runs in localhost server. In my emulator the URL is http://localhost:8080/myaction

Is it possible to retrieve the information from the server?

Android Solutions


Solution 1 - Android

Localhost is device's own loopback interface, if you're trying to access your development machine use 10.0.2.2.

More about it here.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionsaravananView Question on Stackoverflow
Solution 1 - AndroidNikola SmiljanićView Answer on Stackoverflow