I'm working on an android automation project, and I need to connect to the database inside the Android device here is my connection method:
public static Connection getConnection() {
String device= 10.172.5.99:5555/sdcard/company/database/dbName.sqlite3;
Connection conn;
try {
Class.forName("org.sqlite.JDBC");
String dbURL = "jdbc:sqlite" + ":"+ device;
conn = DriverManager.getConnection(dbURL);
return conn;
} catch (Exception ex) {
ex.printStackTrace();
conn = null;
}
return null;
}
And it's not connecting to the db in the devices, it's searching it in the workspace. I'm new to this so any pointer would be great on what I'm doing wrong.