R rodmcm Active Member Licensed User Longtime User May 10, 2020 #1 I save files to external storage with this code B4X: Copy DirFile = rp.GetSafeDirDefaultExternal(Starter.ProjectFileName) su.SaveCSV2(DirFile, "PREFERENCES.csv", ",", data, headers) This successfully saves in the directory InternalStorage>Android>data>b4a.Terminations>files>IPS2 ( ProjectFileName = IPS2) On the SD card in the Levono Tablet ( Oreo) which mounts as ESD-USB the directory is created the same but the file does not exist ( I see this with App Files on the Tablet, and the PREFERENCES.csv file is viewable only in the Internal Storage) The second issues is that when I search either the ESD-USB or the internal shared storage via Windows10 explorer all of the files in data are present except b4a.Terminations In other words this directory is not visible and hence no access to the files inside Is there something I should be doing to allow the b4a.Terminations folder to be viewable? Why the double folders?
I save files to external storage with this code B4X: Copy DirFile = rp.GetSafeDirDefaultExternal(Starter.ProjectFileName) su.SaveCSV2(DirFile, "PREFERENCES.csv", ",", data, headers) This successfully saves in the directory InternalStorage>Android>data>b4a.Terminations>files>IPS2 ( ProjectFileName = IPS2) On the SD card in the Levono Tablet ( Oreo) which mounts as ESD-USB the directory is created the same but the file does not exist ( I see this with App Files on the Tablet, and the PREFERENCES.csv file is viewable only in the Internal Storage) The second issues is that when I search either the ESD-USB or the internal shared storage via Windows10 explorer all of the files in data are present except b4a.Terminations In other words this directory is not visible and hence no access to the files inside Is there something I should be doing to allow the b4a.Terminations folder to be viewable? Why the double folders?
Erel B4X founder Staff member Licensed User Longtime User May 11, 2020 #2 rp.GetSafeDirDefaultExternal will not point to the sd card. You must use ExternalStorage class to access the sd card. ExternalStorage - Access SD cards and USB sticks Upvote 0
rp.GetSafeDirDefaultExternal will not point to the sd card. You must use ExternalStorage class to access the sd card. ExternalStorage - Access SD cards and USB sticks
R rodmcm Active Member Licensed User Longtime User May 13, 2020 #3 Thanks Have posted a small offering on Code Snippets for a simple file storage using ExternalStorage class The reason for the none recognition of the file is a known android problem. I used the App MediaRescan which solves this problem Upvote 0
Thanks Have posted a small offering on Code Snippets for a simple file storage using ExternalStorage class The reason for the none recognition of the file is a known android problem. I used the App MediaRescan which solves this problem