This is strange. I couldn't find a library for download on sqlite.org. I extracted the libsqliteX.so from the sqlite-
android-3360000.aar:
- Rename the aar file to be a zip file
- extract it
- find the library in the jni\armeabi-v7a subdirectory
This is my source code:
Code: Select all
ZConnection1.LibraryLocation := TPath.Combine(TPath.GetHomePath, 'libsqliteX.so');
DbLocation := TPath.Combine(TPath.GetDocumentsPath, 'db_sqlite.db');
Memo1.Lines.Append(DbLocation);
ZConnection1.Database := DbLocation;
ZConnection1.Protocol := 'sqlite';
ZConnection1.ClientCodepage := 'UTF-8';
ZConnection1.Connected := true;
Memo1.Lines.Append(BoolToStr(FileExists(DbLocation), True));
The last line of the source code tells me that the database file got created successfully.
My deployment settings tell Delphi to deploy the libsqliteX.so file to ".\assets\internal\".
I tested this only as a 32 bits application on a Samsung Note 10 having
Android version 11.