Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android. ActiveJDBC possible?

Official web site says that library supports SQLite 3. Android has SQLite. Is it possible to use JavaLite's ActiveJDBC in Android Studio project?

Website says that conenction is made like this:

   Base.open("com.mysql.jdbc.Driver", "jdbc:mysql://localhost/test", "the_user", "the_password");
   Employee.findAll().dump();
   Base.close();

In the case of Android, how to connect library to SQLite database?

like image 541
Joe Richard Avatar asked Oct 30 '22 11:10

Joe Richard


1 Answers

According to this: http://developer.android.com/reference/java/sql/package-summary.html, there is JDBC support on Android now, but if you take a look at this: http://developer.android.com/reference/java/sql/DriverManager.html it states: "...Android does not include any JDBC drivers by default; you must provide your own."

Quick googling for Android SQLite JDBC drivers brought up some dead projects, so I assume this not possible simply because there are no drivers available. The framework itself would probably work if there was a driver.

like image 183
ipolevoy Avatar answered Nov 11 '22 10:11

ipolevoy