-2
I have a server with webservices running locally.
When I run the android application in the emulator, this can connect to the webservice. When I run the same app on a real device, it doesn’t connect.
Some help?
-2
I have a server with webservices running locally.
When I run the android application in the emulator, this can connect to the webservice. When I run the same app on a real device, it doesn’t connect.
Some help?
1
Good guys.
After two days to find out why in the emulator gave and the real device could not, I reached the solution of the problem.
PROBLEM: I made an Android application that used services and those services ran on a local server. When testing the app in the emulator the application ran and the services were called, but when testing on a device, it could no longer call the services.
ERROR MADE: The error was in httpTransportSE, in the call(SOAP_ACTION, URL) function and was an "error (No route to host)".
REASON FOR THE PROBLEM: After an investigation into why this happened, I concluded that it was due to the place where the services were run (location of the served - IP) and not a code problem. The services were running locally, so that the Android application knew the location (IP) of the served (services), it was necessary that they were both running on the same network.
SOLUTION: Make a router PC (create a network) and connect both the server(services) to that network created as the android device.
HOW TO MAKE A PC FROM ROUTER:
After these three steps the created network will already appear.
NOTE:
It was the problem and solution that I found and worked. Thank you!
Browser other questions tagged android web-service emulator webserver
You are not signed in. Login or sign up in order to post.