The place to discuss anything and everything about running your LiveCode on Android
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
SteveTX
- Posts: 170
- Joined: Sun Jan 17, 2010 9:00 pm
Post
by SteveTX » Mon Jul 15, 2013 10:18 am
I have an app with an external stack file, and in my copy files section, i have a folder called "resources" containing many files needed. When I check the folder to see what is unpacked, there is nothing there. What am I missing?
Code: Select all
command listDir
if the platform = "android" or the platform = "iphone" then
set the defaultfolder to specialFolderPath("engine")
debugIt ("The Files in " & defaultfolder & " are:" & the files)
end if
end listDir
-
SteveTX
- Posts: 170
- Joined: Sun Jan 17, 2010 9:00 pm
Post
by SteveTX » Mon Jul 15, 2013 10:41 am
Update: This is most definitely a bug
In my copy files section, which has the "resources/*" directory listed, I also added a single text file, and ran the test again. The text file was there, the directory nor any of its content was unpacked. File copy of directories definitely seems to have a bug. My other stack file is missing also, and there are no other files in cache or documents listed either.
-
SteveTX
- Posts: 170
- Joined: Sun Jan 17, 2010 9:00 pm
Post
by SteveTX » Mon Jul 15, 2013 10:50 am
i tried adding the individual files, which are in a subdirectory of the dir i keep my stack in, and that didn't work. If I copied those files to my desktop and referenced them from there, only the .json files unpacked, none of the other filetypes worked.
-
SteveTX
- Posts: 170
- Joined: Sun Jan 17, 2010 9:00 pm
Post
by SteveTX » Mon Jul 15, 2013 11:13 am
There also seems to a file size limitation somewhere. I can get files to copy if I reference them outside of the livecode directory, such as in My Documents or Downloads, however files i've tested over a few hundred KB will not be copied, only smaller files.
-
Klaus
- Posts: 14199
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Mon Jul 15, 2013 11:54 am
Hi Steve,
sorry, I don't develop for Android, but if you think this is a bug, please send a mail with description to:
bugs@runrev.com
Best
Klaus
-
jacque
- VIP Livecode Opensource Backer

- Posts: 7393
- Joined: Sat Apr 08, 2006 8:31 pm
-
Contact:
Post
by jacque » Mon Jul 15, 2013 6:12 pm
If the files are in a resource folder at the engine level, then the folder path to look at will be:
specialFolderpath("engine") & "/resources/"
Did you try lookingi for your files there? Android is case-sensitive, so make sure you capitalize "resources" correctly.
There will be no files in documents or cache until you move some there. They are not populated automatically. Also, "the files" will not return directory names, you need to check "the folders" instead.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
-
SteveTX
- Posts: 170
- Joined: Sun Jan 17, 2010 9:00 pm
Post
by SteveTX » Mon Jul 15, 2013 6:56 pm
jacque, if look at the code you can see it would show me if the files were there, and unless I do the following, they don't show up (./resources/ isn't created despite being in the copy files section). I recreated the livecode stack from scratch and it reproduced the problem. I can bypass the issue if I zip the files up and put the zip file outside of the .livecode file's directory / subdirectory. Including directories, even outside of the livecode file directory, does not work. Files larger than around ~150KB don't get copied at all. The case is the same with any external livecode stacks referenced. I've submitted a bug report.
-
SteveTX
- Posts: 170
- Joined: Sun Jan 17, 2010 9:00 pm
Post
by SteveTX » Mon Jul 15, 2013 7:33 pm
Got the "resources" folder to be included when I move it out of the parent directory. However, the files that were missing, namely .ttf files, have been moved to (engine)/fonts/ automagically, but don't seem to be recognized/loadable on android. Empty engine directories, such as webkit, sounds, and images, are symlinked back to the parent directory. Files that aren't determined to fall into one of those catagories get stuck in the (engine) root.