Page 1 of 1

Copied files not present in "engine"

Posted: Sat Jan 17, 2015 12:41 pm
by Tukcedo
Friends, another mystery (well, to me anyway) ...

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: 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

      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"
   end try

Re: Copied files not present in "engine"

Posted: Sat Jan 17, 2015 9:25 pm
by jacque
It might have something do to with this:

BTW, you won't ever see any files in /data/ unless your device is rooted. That's a protected folder.

Re: Copied files not present in "engine"

Posted: Sun Jan 18, 2015 8:24 am
by Tukcedo
Yes Jacque I think you're correct. Looks like that bug indeed ... Hope it's fixed soon then.