Let’s see if I can simplify my requirements into something legible!
Programme: (PeteA) tracks small furry critters in the Australian Bush by observation on foot, by road
or plane. It creates a .csv file with the locations and other data, and can take photos - NOT wanted in the standard android Photos collection. In the initial version, it created \PeteA\ and this worked well.
I would like to put these files in the \documents\ subdirectory, in suitable subdirectories, eg
\documents\PeteA, with further subdirectories below this as desired by the user.
These files, while they can be accessed by other programmes on the android system, and more usually taken off by plugging the phone/tablet into a computer and taking them from there.
With the current mess that android has made of its files, I am forced to put the files in a directory
like \android\emulated\0\com.embarcadero\PeteA (or something like this), which is an accursed nuisance for people to hunt for from their computers!
I find that I can create the \documents\PeteA\ subdirectory, and can write files to it. Unfortunately when I try to read files from this subdirectory (GetDirectory) I get a variable number of files, from zero to about half the files which were written.
I have read the scoped storage stuff. To me, being medical, “scoped” means something like “Old Bill had a bad cough. I scoped him last friday and found his lung cancer. Pity!”
Like everyone else, I have no idea what restrictions and other weird ideas android will bring in the next 10 versions, and would like to be able to write code that will not have to be altered every year or two with the next (and the next . . .) storage ideas!
Some time ago, and I do not know where it was, to my frustration, there was some code on the net which told android that the user wanted access to a particular directory, asking the user if he was happy to grant access to that directory via a message sent to that user at the time. Then this code returned some kind of token which allowed future access by this programme to that subdirectory (though this was lost when the programme was uninstalled/reinstalled, I think). Has anyone any memory of this?
Do you think android would be happy to consider an unprotected directory (eg \data), for those of us who have no need for security (the tablet is miles from the nearest internet after all!) with full access at our own risk? Or am I just too old-fashioned?