How can I access the SD card on Mobile Devices

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
trags3
Posts: 432
Joined: Wed Apr 09, 2014 1:58 am

How can I access the SD card on Mobile Devices

Post by trags3 » Thu May 29, 2014 8:39 pm

I saw the statement somewhere that allows one to read/write to the SD card.
I can't seem to find it now.
Help Please!

Tom

trags3
Posts: 432
Joined: Wed Apr 09, 2014 1:58 am

Re: How can I access the SD card on Mobile Devices

Post by trags3 » Fri May 30, 2014 1:23 am

I just figured out that Google doesn't allow it. :cry:

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: How can I access the SD card on Mobile Devices

Post by Simon » Fri May 30, 2014 2:09 am

Hi Tom,
Not sure that is true, a long time ago I made an app that played a video from the sdcard. I think that means write as well.
Found it, yes here is the start of the path "mnt/sdcard/" the subfolders are available to you.

Simon
Edit: In thinking about it this may only apply to external sdcards (the kind you buy separately and install). I've noticed on my device without external memory still calls the internal memory sdcard.
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

trags3
Posts: 432
Joined: Wed Apr 09, 2014 1:58 am

Re: How can I access the SD card on Mobile Devices

Post by trags3 » Fri May 30, 2014 2:19 pm

Simon wrote:Hi Tom,
Not sure that is true, a long time ago I made an app that played a video from the sdcard. I think that means write as well.
Found it, yes here is the start of the path "mnt/sdcard/" the subfolders are available to you.

Simon
Edit: In thinking about it this may only apply to external sdcards (the kind you buy separately and install). I've noticed on my device without external memory still calls the internal memory sdcard.
Simon,
Thanks I recently saw this path somewhere but I couldn't find it anywhere.
Tom :)

charms
Posts: 122
Joined: Mon Feb 10, 2014 6:21 pm
Contact:

Re: How can I access the SD card on Mobile Devices

Post by charms » Sat May 31, 2014 1:24 am

If there is a sdcard installed and accessible on Android it will be /mnt/sdcard or /scard depending on the Android Version you are using. This is what their specs say. It works for me on a Samsung Galaxy tablet.

Code: Select all

      if there is a folder "/sdcard" then
         set the defaultFolder to "/sdcard"
      else
         set the defaultFolder to "/mnt/sdcard"
      end if
Kind regards,
Chris

Post Reply