Copied files not present in "engine"

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Tukcedo
Posts: 65
Joined: Fri Jun 27, 2014 9:43 pm

Copied files not present in "engine"

Post by Tukcedo » Sat Jan 17, 2015 12:41 pm

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: 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
Michel J.L. van der Kleij
Coding to help stray animals in the Philippines
Albert Foundation - http://albert.tukcedo.nl
Aklan Animal Rescue & Rehabilitation Center - http://aarrc.tukcedo.nl

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7228
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Copied files not present in "engine"

Post by jacque » Sat Jan 17, 2015 9:25 pm

It might have something do to with this: http://quality.runrev.com/show_bug.cgi?id=14295

BTW, you won't ever see any files in /data/ unless your device is rooted. That's a protected folder.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Tukcedo
Posts: 65
Joined: Fri Jun 27, 2014 9:43 pm

Re: Copied files not present in "engine"

Post by Tukcedo » Sun Jan 18, 2015 8:24 am

Yes Jacque I think you're correct. Looks like that bug indeed ... Hope it's fixed soon then.
Michel J.L. van der Kleij
Coding to help stray animals in the Philippines
Albert Foundation - http://albert.tukcedo.nl
Aklan Animal Rescue & Rehabilitation Center - http://aarrc.tukcedo.nl

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”