Search code examples
androidlocalhostandroid-ksoap2android-networking

How an Android phone interacts with the server?


I have an app running fine in emulator but not in mobile. That is app basically fetch some records from server using webservice.(SOAP). Installation is successfull and i can open the first page.but not able to proceed further due to server communication. I need your help in making this app to work fine in my android phone too. Thanks in advance!!


Solution

  • You must be accessing the web service on your local network (localhost). An emulator can access a localhost web service, but a real device cannot. To test the app on an actual device, you need to expose your web service through a public IP address (public URL).