Here's our situation:
We have some native code that scans user-defined directories at certain times. The goal is to collect data about specific types of file and build an SQLite database from it. There could be tens of thousands of files to query.
The problem is that each time a file is found, the data collected about that file must be ushered across the JNI boundary to Java-land before being comitted to the database via the SQLite classes provided by the Android SDK. This takes far too long.
The proposed solution is to download the SQLite source code, link it into our project and build the database natively as described here: SQLite with Android NDK. This would eliminate the time taken to pass the data from the C++ layer to the Java layer entirely.
The question is: if this is done, can the Android SDK (Java layer) still be used to open the database, obtain Cursor objects etc. as normal? We can keep the database extremely simple; no foreign keys, triggers, constraints etc. Although indexes are very desirable.
We have considered pipes and sockets to move the data across the JNI boundary. However, named pipes are not supported on Fat32 file systems (so this is not useable incase the user moves the application to a Fat32 formatted SD card). Sockets are also not usable because we will have to include internet permissions in the manifest which we feel would look suspicious.
If anybody has any information on this, we'd love to hear from you.
Many thanks, P.