Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Android / [SOLVED] Get sdcard Path

Author
Message
Hubert BAYRE
2
Years of Service
User Offline
Joined: 21st Oct 2017
Location: France
Posted: 17th Nov 2019 17:59 Edited at: 17th Nov 2019 18:04
Hello !
Is there a method/command to determine the sdcard path of an android device ?

(Note : for me GetDocumentsPath() Return the internal device path)
Many thanks.

The author of this post has marked a post as an answer.

Go to answer

blink0k
AGK Developer
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 18th Nov 2019 06:09 Edited at: 18th Nov 2019 06:10
This post has been marked by the post author as the answer.
Here is what appears to be a fairly good list of sdcard device names

Maybe you could SetErrorMode(1) and then attempt to OpenRawFolder() for each of the folders on the list until it returned a non-zero result.

Not perfect, but it's better than nothing i think
Virtual Nomad
13
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 19th Nov 2019 02:37
Quote: "GetDocumentsPath() Return the internal device path"

when broadcast to my phone, it returns "/storage/emulated/0" which is the phone's root path.

when exporting the following, i receive "Error: Failed to open..." with "may not exist or this app doesn't have permission to accesss ... it at line 23" (3 sss's...?)


line 23:
FolderID = OpenRawFolder(path$)

so, it defines path$ 2 lines above**

IE: path$ = GetDocumentsPath()

...but can't open it.

**since confirmed with the following after line 21:


otherwise, the code runs fine using the root path when broadcast.

i know this isn't about the SD card but it may be refusing existence of the SD card due to a "permissions" thing (that i see no "tick" for in export)?

Hubert BAYRE
2
Years of Service
User Offline
Joined: 21st Oct 2017
Location: France
Posted: 19th Nov 2019 06:24
@Virtual nomad Permissions ?

Hubert BAYRE
2
Years of Service
User Offline
Joined: 21st Oct 2017
Location: France
Posted: 20th Nov 2019 05:42
Many thanks. it's just a pain to include all the sd cards path !

Login to post a reply

Server time is: 2019-12-12 06:01:29
Your offset time is: 2019-12-12 06:01:29