Saving to External SD Card

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Gene
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 75
Joined: Wed Mar 09, 2011 6:48 pm
Location: Northern California

Saving to External SD Card

Post by Gene » Tue Mar 31, 2015 6:29 pm

I have no difficulty saving to the internal SD card, but Android seems to not want to let me save to the external card. I remember reading that Android restricts access to the external card, but I see that other apps are writing to it, so I assume there is a way.

My Android version is 4.4.2. Looking at the directory "/mnt/" I see two SD cards available on my device: "sdcard" & "extSdCard." I am writing successfully to "/mnt/sdcard/," but get no result when trying to save data to "/mnt/extSdCard/," which is the one that can be inserted into the device.

I thought perhaps that the app needed to be signed and installed as it would from the Play Store, but that didn't work, either. Any ideas about whether it's possible to read and write the external card?

Thanks,

Gene

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Saving to External SD Card

Post by MaxV » Tue Apr 07, 2015 4:35 pm

In Standalon application setting, did you check the right permission requests? ("write external storage")
Moreover, is it correct the name you use? Is it "/mnt/sdcard2"?
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Location: Plymouth, UK
Contact:

Re: Saving to External SD Card

Post by dave.kilroy » Tue Apr 07, 2015 9:20 pm

Yup check the standalone application settings dialogbox

I once wasted two hours because each time I opened the dialogbox my stupid assumption of what I thought was reality prevented me from seeing that I had in fact NOT ticked a particular box - DOH!

Eventually reality beat my assumption into pulp and I could see what had been in front of me all the time...
"...this is not the code you are looking for..."

Gene
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 75
Joined: Wed Mar 09, 2011 6:48 pm
Location: Northern California

Re: Saving to External SD Card

Post by Gene » Wed Apr 08, 2015 5:11 am

Thanks for both replies. Yes, I verified again that I have the "Write External Storage" box checked.

However, the names of the sd cards are somewhat confusing, depending on what I use to look at them with. For example, Astro File Manager reports "sdcard0" and "extSdCard." Then, when I use The Folders to list the directories under "/mnt" I get "sdcard" and "extSdCard." I am successfully writing to "sdcard" (not sdcard0), but it seems I can't write to "extSdCard." Nowhere do I see any other names for the external storage device.

I will try "sdCard2," though, and see what happens. It's frustrating, since I see that other apps have proprietary folders and files on the external card.

Post Reply

Return to “Android Deployment”