Android Question Automatic creation of Directory in Android/Data

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Hi to All
to day I had another surprise: till now, when I did an App and run it on a Tablet, I always found inside Android/Data a Directory with the name of tha App. To day I need to do a test, reading a file and I was looking for such a directory (which, btw, is the fastest way to write files that the App must read). Normally I put files there by a cable connection. To day, after preparing the Test App, i went to Android/Data in the tablet and I don't find any subdirectory with the name of the new App. Of course I gave the name to the package.. I connected and disconnected the cable.. Changed the App name ...I develop Apps on B4A since 2011 not since yesterday .. so the only explanation may be that I am "gone" (the first of course) ... or the geniuses that develop Android had a new idea to help us to save time with useful tricks ... I even have shame to post such a problem .. Forgive me in advance ...
 

Attachments

  • i1.png
    55.8 KB · Views: 126

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Are you trying to access File.DirInternal? Or File.DirDefaultExternal? The first one is inaccessible.
Hi Erel, thanks for answering. Of course the second. I did this hundreds of times.. that's why I am surprised. Usually I connect with cable and put files in Android/Data/AppName/files which is accessible with RuntimePermission.GetSafeDirDefaultExternal(...). My only suspect is that, if I don't do any access to the disk by the App, the above mentioned directory is not created. As a matter of fact I was testing a little example App from Klaus, about drawing with canvas. No file access. First of all I compiled it "as is". Then i planned to put some data on the directory, read it etc. And .. I saw that actually the directory didn't exist..
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…