thank you very much for coming up with a design document... this is greatly appreciated...
and as I can see, we will be able to read and write also from/to the shared directories in future...
Shared - Reads and writes files to shared directories, such as Documents, Music, etc. The paths are rewritten to use the MediaManager API.
you mentioned in that document
The File component is the component most affected by Google's technical changes in Android and policy changes in Google Play.
what about the other components? Example: Let's assume, I like to take a picture and store that picture in the shared directories, so it will be available also for the Gallery app.
Will the new Scope functionality also be implemented in other components like the media components, especially Camera, Camcorder, ImagePicker, Player, Sound, SoundRecorder, VideoPlayer?
At the moment the plan is to implement a property on the Form to control the default for all of the other components. A future release may bring the scope property to the other components if needed. The File component also adds a MakeFullPath method that given a scope and a path will return a fully qualified path that can be used with the other components if needed.
@Anke Here's a link to a test server. I'm still doing some bug fixes but it should give you an idea of how the updated component works. Please let me know of any issues you encounter.
I did a few tests on the test server with the File component, which don't seem to make much sense (or are not very helpful). Unfortunately I was only able to test with Companion (Android 11) because the build server does not work.
I've had a look at the design document for File API Changes which looks very useful indeed. One thing that bugs me is the fact that the Sharing component uses different file/path naming conventions from the File component (saving and reading). Will this be fixed in the update?
(I use the sharing component to share txt and csv files produced by apps with google drive and so my computer where I have a lot more flexibility.)
I'll have the build server set up today. I was trying to get this up before my vacation but didn't have enough time to finish the build functionality since there's some additional complexity there.
When using the // slashes in a filename you have to set the filescope to legacy i think.
Legacy - Interprets the file name based on the older File semantics. A filename starting with two slashes (i.e., "//") will be read from the assets. A filename starting with a single slash (i.e., "/") will be read from the root of the external storage directory on SDK versions prior to SDK 29. From SDK 29+, it will be read/written in the app-private directory on the external storage. A file without a starting slash will be read/written in the app's private directory (equivalent to Private scope).
I had already tried this (unsuccessfully). But since the File.ReadFrom_fileName method does not provide any other option (to read from assets), this should be preset.