Android Question How do we access files stored on external SD Card

Tejwant Navalkar

Member
Licensed User
Longtime User
I am trying to store my data files on SD Card so that the data can be take onto my desktop or shared with my colleagues.

I am using "File.DirRootExternal". However this creates the file on the phone memory itself. Also the file created can be seen by any of the File explorer apps, but cannot be seen on my Laptop,when I Connect the Mobile to the Laptop using the USB port.

Please advise.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The SD card is problematic to work with.

Starting from Android 4.4 there is an API that allows you to get the path to the sd card: https://www.b4x.com/android/forum/threads/how-to-ext-sd-card-write-on-android-4-4.42177/#post-255351
On older versions there is no similar API.

Also the file created can be seen by any of the File explorer apps, but cannot be seen on my Laptop,when I Connect the Mobile to the Laptop using the USB port.
Use this code to force the media scanner to scan the file: https://www.b4x.com/android/forum/threads/force-media-scanner-on-deleted-file.25794/#post-214985
 
Upvote 0
Top