?specialFolderPath("external")=mnt/sd card/ or mnt/sd card1?

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

?specialFolderPath("external")=mnt/sd card/ or mnt/sd card1?

Post by BarrySumpter » Mon Mar 19, 2012 6:20 pm

specialFolderPath("external")
Is there an equilivant special folder path in live code for external storage?
i.e.
mnt/sd card/
mnt/sd card1/
mnt/sd card2/

Someone had a huge huge list of folder paths but can't seem to find the link.

I can't seem to find the sd card folder on android:

Code: Select all

on mouseUp
   
   put "checking for folder /sdcard/" into field txtDisplayResult
   
   if there is a folder "/mnt/sdcard" then
      put "/mnt/sdcard - exists" into field txtDisplayResult
   end if
   
   if there is a folder "mnt/sdcard" then
      put "mnt/sdcard - exists" into field txtDisplayResult
   end if
   
   if there is a folder "/sdcard" then
      put "/sdcard - exists"  into field txtDisplayResult
   end if
   
   if there is a folder "/sdcard" then
      put "sdcard - exists" into field txtDisplayResult
   end if
   
   
   put "checking for folder /sdcard/" into field txtDisplayResult
   if there is a folder "/sdcard/" then
      put "sdcard - exists" into field txtDisplayResult
   end if
   
   
   
   open file "/sdcard/Barry.txt" for text read
   read from file "/sdcard/Barry.txt" until EOF
   put it into field txtDisplayResult
   close file "/sdcard/Barry.txt"
   
end mouseUp
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: ?specialFolderPath("external")=mnt/sd card/ or mnt/sd ca

Post by BarrySumpter » Mon Mar 19, 2012 7:15 pm

/mnt/storage/ ?
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: ?specialFolderPath("external")=mnt/sd card/ or mnt/sd ca

Post by BarrySumpter » Mon Mar 19, 2012 7:30 pm

It was me. I be a dufus.

ummm 5:30am here.
Is that a good excuse?

Code: Select all

on mouseUp
   
   put "checking for folder /sdcard/" after field txtDisplayResult
   
   if there is a folder "/mnt/sdcard" then
      put cr & "/mnt/sdcard - exists" after field txtDisplayResult
   end if
   
   if there is a folder "mnt/sdcard" then
      put cr & "mnt/sdcard - exists" after field txtDisplayResult
   end if
   
   if there is a folder "/sdcard" then
      put cr & "sdcard - exists"  after field txtDisplayResult
   end if
   
   
   if there is a folder "/sdcard/" then
      put cr & "/sdcard/ - exists" after field txtDisplayResult
   end if
   
   put cr & "checking for folder  /mnt/storage/" after field txtDisplayResult
   if there is a folder "/mnt/storage/" then
      put cr & " /mnt/storage/ - exists" after field txtDisplayResult
   end if
   
   if there is a file "/mnt/storage/GPS.txt" then
      put cr & "/mnt/storage/GPS.txt - exists" after field txtDisplayResult
   end if
   
   
   
   open file "/sdcard/Barry.txt" for text read
   read from file "/sdcard/Barry.txt" until EOF
   put cr & it after field txtdisplayResult
   close file "/sdcard/Barry.txt"
   
end mouseUp
Last edited by BarrySumpter on Mon Mar 19, 2012 10:50 pm, edited 1 time in total.
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: ?specialFolderPath("external")=mnt/sd card/ or mnt/sd ca

Post by jacque » Mon Mar 19, 2012 7:53 pm

You may be thinking of this link: http://www.sonsothunder.com/devres/revo ... ile010.htm but that doesn't include mobile paths.

The Android release notes suggest: A standard approach to this is to store the desired file on the SD card (/sdcard/). If you app is writing to an external location, have the “Write External Storage” option ticked in the standalone builder.

What did your test script say about the paths?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: ?specialFolderPath("external")=mnt/sd card/ or mnt/sd ca

Post by BarrySumpter » Mon Mar 19, 2012 8:03 pm

Hi jacque,

The first verions on my script in the original post kept replacing/overlaying the previous message.
SO I would only see blanks thinking it wan't working. (5.30am itus)

The second version is working correctly.
As usual as soon as I post a question I find the answer within 5 mins.
Maybe I use the post as a process purge so I can start thinking properly.
:mrgreen:

...
/mnt/sdcard - exists
.mnt/sdcard - exists
sdcard - exists
/sd/card/ - exists
...
my Barry.txt info display correctly


I'd be interested in seeing the results of other Android phones and tablets.

I was just reading here to elsewhere that some adroid tablets have
an EXternal storage card
AND
an INternal storage card.
Last edited by BarrySumpter on Mon Mar 19, 2012 10:51 pm, edited 1 time in total.
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: ?specialFolderPath("external")=mnt/sd card/ or mnt/sd ca

Post by jacque » Mon Mar 19, 2012 8:29 pm

Samsung Galaxy Tab Plus (7") Honeycomb 3.2:

/mnt/sdcard - exists
.mnt/sdcard - no
sdcard - exists
/sd/card/ - no

Archos 70 Internet Tablet, Froyo 2.2.1:

/mnt/sdcard - exists
.mnt/sdcard - no
sdcard - exists
/sd/card/ - no
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: ?specialFolderPath("external")=mnt/sd card/ or mnt/sd ca

Post by mwieder » Mon Mar 19, 2012 8:30 pm

Barry-

Do you have the Android command line app installed?

http://www.appbrain.com/app/android-ter ... ndroidterm

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: ?specialFolderPath("external")=mnt/sd card/ or mnt/sd ca

Post by BarrySumpter » Mon Mar 19, 2012 10:44 pm

Thanks for the input jacque.
Look like its
mnt/sdcard
and
sdcard

goo to know

Hi mwieder,
I refuse to use dos apps or terminal apps, etc.
It's criminal :twisted:
that we can't do whatever dos apps do
in a proper modern graphical environment.
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: ?specialFolderPath("external")=mnt/sd card/ or mnt/sd ca

Post by Mag » Wed Dec 25, 2013 4:58 pm

I, for know the default folders on Android I use mergStoragePath, a command of mergAndroid external. Unfortunately for pictures it points only on SD Card so no way to know the Pictures folder of internal storage. I know very little on Android, so maybe there is not any Pictures folder on Android internal storage...

BTW, is there a way to know if there is a SD Card available?

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: ?specialFolderPath("external")=mnt/sd card/ or mnt/sd ca

Post by MaxV » Fri Dec 27, 2013 9:42 am

Opera browser and many other "big" software on Android point always directly to "/mnt/sdcard" (without spaces). Android 4 usually emulates that position if a sdcard is missing.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

Post Reply