This discussion is archived
11 Replies Latest reply: Sep 10, 2013 2:17 AM by MFadel RSS

Cannot connect locally on android device.

MFadel Newbie
Currently Being Moderated

Hello,

 

I'm using JDeveloper 11.1.2.3. I created a mobile application by which i can access a table from the database. I did this by creating a web service from data controls. I deployed the application to the android emulator. Everything works great and i'm able to query the table using a simple view criteria. I know that in order to be able to connect to the database, i have to change the url in the connections.xml file from

 

"http://localhost:7101/MobileExample-Model-context-root/AppModuleService?WSDL"


to


"http://10.0.2.2:7101/MobileExample-Model-context-root/AppModuleService?WSDL"

 

Everything works great after changing to 10.0.2.2. However, this is working only in the emulator environment. Whenever i try deploying to the device i'm getting:

 

Cannot connect to 10.0.2.2 on port 7101:java.net.ConnectException: Connection timed out.


I read that i should also change the port to 8080. But still it's not working.


I tried entering the URL in the browser of the device to check if its working, but it wasn't!

 

Any one has an idea about this?


Thank you,

 

Mohamed.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points