test the localhost in android emulator
Asked Answered
R

1

62

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?

Resurrect answered 10/2, 2010 at 5:53 Comment(1)
Please mark your preferred answer as correct (checkmark beside the answer) so that others may see at a glance which is the correct answer and the author gets the reward.Cryogen
H
128

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.

Harmless answered 10/2, 2010 at 8:3 Comment(2)
thank u. and how to get the database connection from our web application. i want to retrieve the data from database i like listview in android pls help meResurrect
yeah... i'm not sure that the 10.0.2.2 is pointing to 127.0.0.1:8080 instead of 127.0.0.1 only. Hey, anyway, have you solved it @saravanan?Phillip

© 2022 - 2024 — McMap. All rights reserved.