The place to discuss anything and everything about running your LiveCode on Android
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
bqsbarbqGAnC5Z
- Posts: 77
- Joined: Thu Dec 08, 2011 12:19 pm
Post
by bqsbarbqGAnC5Z » Sat Jul 14, 2012 10:09 pm
Hi Everyone,
I've been reading a lot of stuff about saving a txt file to the SD card and whatnot, but I'm not quite sure how to save to my phone memory since I don't have an SD card in my phone.
Ive been using
Code: Select all
put the cVariable of this stack into url("file:" & specialFolderPath("mnt/sdcard") & "/filename.txt")
but I whenever I run this, a file is never created in this directory, or any other directory I try. I chose mnt/sdcard because it seemed to be the default folder in my phone. Anyone have any suggestions that I can try?
Thanks for reading!
-
Cool Dave
- Posts: 35
- Joined: Mon Jun 25, 2012 8:44 pm
Post
by Cool Dave » Mon Jul 16, 2012 5:32 pm
Hi,
Have you tried specialfolderpath("documents") ? According to my research, that should be the folder for application data.
If that doesn't work, look up specialfolderpath in the dictionary, if you haven't already. I'd like to know if "documents" doesn't do it.
All the best,
Dave
-
jacque
- VIP Livecode Opensource Backer

- Posts: 7389
- Joined: Sat Apr 08, 2006 8:31 pm
-
Contact:
Post
by jacque » Mon Jul 16, 2012 11:30 pm
SpecialFolderPath gives access to certain specific system folders as listed in the dictionary. The location you want to write to isn't in that list, so you can't use specialFolderPath. Just use the file path by itself:
put the cVariable of this stack into url ("file:/mnt/sdcard/filename.txt")
I'm not positive that's the right path exactly but it's the right idea.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
-
bqsbarbqGAnC5Z
- Posts: 77
- Joined: Thu Dec 08, 2011 12:19 pm
Post
by bqsbarbqGAnC5Z » Thu Jul 19, 2012 4:30 am
Hm, thanks for the posts guys but neither of these seemed to have solved my problem. Still can't get any txt files to write to my memory. I'm going to keep playing with it and report back if I make any progress.
-
BvG
- VIP Livecode Opensource Backer

- Posts: 1239
- Joined: Sat Apr 08, 2006 1:10 pm
-
Contact:
Post
by BvG » Fri Jul 20, 2012 2:00 pm
Most likely your path to the folder on your drive is wrong. To find the correct path, try this:
Code: Select all
on mouseUp
answer folder ""
put it
end mouseUp
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
-
Mark
- Livecode Opensource Backer

- Posts: 5150
- Joined: Thu Feb 23, 2006 9:24 pm
-
Contact:
Post
by Mark » Sun Jul 22, 2012 11:37 am
Hi,
Are you sure that answer folder works on mobile devices?
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
BvG
- VIP Livecode Opensource Backer

- Posts: 1239
- Joined: Sat Apr 08, 2006 1:10 pm
-
Contact:
Post
by BvG » Mon Jul 23, 2012 4:18 pm
oh... no idea, i always forget to check which forum a topic is in

Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
-
Klaus
- Posts: 14177
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Fri Jul 27, 2012 1:52 pm
No, this does NOT work on mobile devices.