Cannot Create A Folder On Android
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Cannot Create A Folder On Android
Hi Guys,
I am having some difficulties creating a folder on my Android device. I do not want to use "specialfolderpath("documents")" rather, use the Android file system.
I have enabled "Write External" in the Standalone App Settings.
Any help would be greatly appreciated!
Thanks,
Googie.
P.S. I have done this before and know it is possible, but cant remember how I achieved it!
I am having some difficulties creating a folder on my Android device. I do not want to use "specialfolderpath("documents")" rather, use the Android file system.
I have enabled "Write External" in the Standalone App Settings.
Any help would be greatly appreciated!
Thanks,
Googie.
P.S. I have done this before and know it is possible, but cant remember how I achieved it!
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Cannot Create A Folder On Android
How true, how true: I fathered 2 sons this way.P.S. I have done this before and know it is possible, but cant remember how I achieved it!

https://forums.livecode.com/viewtopic.php?t=10409
-
Re: Cannot Create A Folder On Android
I have solved this issue!
Thanks,
Googie.
Code: Select all
create folder "/storage/emulated/0/Temp Files"
Googie.
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Cannot Create A Folder On Android
Um . . . don't you have a "funny feeling" about creating a folder inside
something called "Temp Files" ?
That would suggest to me that a folder created there will not persist between restarts.
The recipe from 2011 I referenced puts a new folder inside a "documents" folder: might be a better bet.
something called "Temp Files" ?
That would suggest to me that a folder created there will not persist between restarts.
The recipe from 2011 I referenced puts a new folder inside a "documents" folder: might be a better bet.
Re: Cannot Create A Folder On Android
Maybe the use case is for temporary files? But anyway I think Android file system locations are notoriously varied. I don't know whether much has changed to streamline the file path on more recent Android versions but in the past you couldn't always rely on a hard-coded path being the same on different devices. Maybe specialFolderPath("external documents") is more useful. This should resolve to a path accessible by other apps on the device whatever the version.
Re: Cannot Create A Folder On Android
Hi, I have the same problem on my Galaxy A14:
if there is not a folder "/storage/emulated/0/Blutdruck" then create folder "/storage/emulated/0/Blutdruck"
doesn't work, neither on SD-Card which is displayed as "B4DB-0DEF"
if there is not a folder "/storage/B4DB-0DEF/0/Blutdruck" then create folder "/storage/B4DB-0DEF/0/Blutdruck"
Write access is set on the phone and Write External Storage is set in both places in the Standalone settings of LiveCode.
Any help ist appreciated.
if there is not a folder "/storage/emulated/0/Blutdruck" then create folder "/storage/emulated/0/Blutdruck"
doesn't work, neither on SD-Card which is displayed as "B4DB-0DEF"
if there is not a folder "/storage/B4DB-0DEF/0/Blutdruck" then create folder "/storage/B4DB-0DEF/0/Blutdruck"
Write access is set on the phone and Write External Storage is set in both places in the Standalone settings of LiveCode.
Any help ist appreciated.
Re: Cannot Create A Folder On Android
There is only one place an app can write files to: specialFolderPath("documents"). The OS does not allow apps to write to any place outside their own sandbox. This true on Android,, iOS, and with minor exceptions, desktop apps. It's a security measure.
There is a feature request for allowing us to access the public folders like you are trying to do, but Google has tightened its requirements and only allows reading from public folders. Livecode still doesn't let us do that though.
There is a feature request for allowing us to access the public folders like you are trying to do, but Google has tightened its requirements and only allows reading from public folders. Livecode still doesn't let us do that though.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com