Android and SQLite without System.Data/Mono.Data for free Unity version

Hi there,

i have many troubles to get an android project, using sqlite, running.
I am using the free version of Unity, so i cant use the System.Data classes, because they have a reference to .Net.Sockets, which are not allowed in the free version.

So i found a simple wrapper to access sqlite3 natevily, but it only can open a database through a filename.
This works great on my local machine, but if i build an android apk, i have to access the file, which i put in the StreamingAssets folder, via WWW from the Application.streamingAssetsPath (location to the .apk file), because its compressed and sqlite3 cannot open it directly.

But then i have only the byte array of the database, but no file to open it with sqlite3.
I have tried to save the file in different paths like Application.persistentDataPath or Application.dataPath, but that doesn’t work either (because the unity default androidManifest doesn’t declare writing permissions for external storage?)

So how is it possible to open the sqlite database with read/write possibilitys?

Thanks in advance!

Edit: i figured out that i can write files to persistentDataPath with this command:
File.WriteAllText(Application.persistentDataPath+“/testfile”,“that is a test message”);
and i can read all bytes with File.ReadAllBytes(Application.persistentDataPath+“/testfile”)

i do so with my via WWW loaded sqlite database, but i still cant open it via sqlite3. do i have to put something like file:/// in front of the filepath? because Application.persistentDataPath starts with /data/data/…

i don’t get it… Please help

Please have a look at SQLiteKit, It will open database from persistence folder, but streaming asset you can’t write on android - it is zip file.