On 25/09/2013, at 1:16 PM, Roger Eller wrote:

> On Sep 24, 2013 10:51 PM, "Monte Goulding" wrote:
>> 
>> On 25/09/2013, at 11:12 AM, Roger Eller wrote:
>> 
>>> *Here's my script:*
>>> 
>>>  *put* mergStoragePath("downloads") into tPath *-- mergAndroid*
>>> 
>>>  *set* the defaultFolder to specialFolderPath("External Documents") &
>>> tPath
>>> 
>>>  *put* specialFolderPath("External Documents") & tPath & "/Prova.txt"
> into
>>> LocalFile
>> 
>> Do you want to save the file into the private external documents folder
> or the public external storage downloads folder? You seem to be trying to
> do both ;-)
>> 
> 
> Well, I want the file on my micro SD, which is /mnt/external_sd/downloads.
> None of the above gets it there.  I couldn't even locate the file until I
> tried:
> put specialFolderPath("External Documents") & tPath & "/Prova.txt" into
> LocalFile
> Then I found the file at /mnt/sdcard/downloads.
> 
> sdcard is merely an internal partition, but external_sd is really the micro
> SD card.


What does mergStoragePath("downloads") give you? It should be the path to the 
public downloads folder you would see in Android File Transfer etc. 
specialFolderPath("external documents") should give you a path to a private 
documents folder which the user can't see when browsing the device.

Lots of devices have multiple sd cards though or do what yours does (mine does 
too) and has an internal partition for the public directories. There appears to 
be no standard api to list all of them and they can be different on each 
device... I just found some java code here that could be translated to LiveCode 
fairly easily if you really need to save on an sd card rather than just in a 
public directory:

http://renzhi.ca/2012/02/03/how-to-list-all-sd-cards-on-android/

Cheers

--
M E R Goulding 
Software development services
Bespoke application development for vertical markets

mergExt - There's an external for that!

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to