Running into a problem when I use my app as a standalone. The basic problem is that at present LCC 7.0.1 on Ubuntu 64-bits doesn't allow you to include SQLite directly, see the QC bug report here: http://quality.runrev.com/show_bug.cgi?id=13213. In that same report, MaxV and RunRev's Neil suggested a workaround that I'm currently following and for which I wrote a Perl script to make my life easier.
Because I can't build directly in the IDE and run with "test" in adb because of that SQLite issue, I now create a standalone, add those libraries, sign the new APK and mail it to myself. This method works but NOT with included files. Both the SQLite database and sound files that I'm using (@Klaus, yes they work hehehe) are simply unavailable!
If I don't use the database and just the sound files, these work fine when I run in adb. Just when I distribute the APK separately through email it doesn't work. I can't find these files in the Android file system with a File Manager either: the /data directory (see in the code below) is empty.
BTW, I checked the zip before it's signed and it DOES include those files under "assets" ...
Code: Select all
try
put specialFolderPath("engine") & "/testmydb.sqlite" into tDatabasePath
if there is not a file tDabasePath then
answer "Database doesn't exist: " & tDatabasePath // this gives /data/app/<android_identifier>-1.apk/testmydb.sqlite
end if
put revOpenDatabase("sqlite", tDatabasePath, , , , ) into tDBid // this catches errors: 219 and 465, error in handler and error in expression (put)
catch tError
answer "An error occurred reading the database or it may not exist: " & tError & return & "Please inform us at xxxxt@yyyyyy.nl"
end try