Android Is ActiveJDBC possible?

The official website says the library supports SQLite 3. Android has SQLite. Is it possible to use JavaLite ActiveJDBC in an Android Studio project?

The site says that coninction is done as follows:

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 the library to the SQLite database?

+5
source share
1 answer

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

A quick Google search for JDBC for Android SQLite caused some dead projects, so I guess this is not possible simply because there are no drivers. The infrastructure itself is likely to work if there was a driver.

+2
source

Source: https://habr.com/ru/post/1241035/


All Articles