Hi i’m having a problem connecting to an oracle database. When I launch my application in emulator it works just fine. But when I try to run it on my phone it crashes. I get the following error:
detailMessage “Io exception: The Network Adapter could not establish the connection
My connectivity code is:
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
Connection conn;
try {
conn = DriverManager.getConnection("jdbc:oracle:thin:@ip:port/dtabase name","user", "port");
So any ideas on what could be a problem? I have the data connection turned on on my phone…
I am going to guess that either you have not requested internet permissions in your manifest or you are using a local IP and your device is trying to connect over WAN and not LAN.