0

I would like to know if it's possible to query a SQLite database from Android C++ Native Code using the NDK and JNI. If so, how would I go about doing it? Would have to create a Java or Kotlin class to manage that? Because I already have some c++ logic that manages an SQLite database, and I would like to integrate that code to an android project without having to start from scratch.

Shay Ribera
  • 359
  • 4
  • 18
  • Where do you plan on storing this SQLite database? The answer determines how easy it will be. – Botje Nov 23 '20 at 14:29
  • I was under the impression that android devices already had a built in SQLite database, so I was hoping to store the tables there. – Shay Ribera Nov 23 '20 at 14:30
  • There are tens if not hundreds of SQLite databases on any given Android phone, I'm afraid. – Botje Nov 23 '20 at 14:32
  • 1
    You can attach to the database associated with your app like this answer: [Connect to SQLite in android NDK NATIVE](https://stackoverflow.com/questions/49905877/connect-to-sqlite-in-android-ndk-native) – Botje Nov 23 '20 at 14:40

0 Answers0