Android Question External Storage - Save Multiple directories?

MrKim

Well-Known Member
Licensed User
Longtime User
I am looking at at the example for accessing external storage HERE. IT allows you to use the previously selected directory and is valid across multiple sessions (as I understand it once your app selects a dir it is good for life?)

My question is is it possible to have "rights" to more than one directory and access it across multiple sessions. With the code in the example it doesn't appear to be possible. You have access to only the last selected directory. In the example I tried to figure out how to save the ExternalFile type to SQLite so I could save more than one dir for use later but was unable to do so.

Thanks for any help/ideas.
 
Solution
as I understand it once your app selects a dir it is good for life?
The behavior depends on the OS. No guarantee that the url will be valid forever.

Yes, you can keep multiple urls that will be kept valid. Use the source code instead of the library and see how the url is stored and tested for validity.

Erel

B4X founder
Staff member
Licensed User
Longtime User
as I understand it once your app selects a dir it is good for life?
The behavior depends on the OS. No guarantee that the url will be valid forever.

Yes, you can keep multiple urls that will be kept valid. Use the source code instead of the library and see how the url is stored and tested for validity.
 
Upvote 0
Solution
Cookies are required to use this site. You must accept them to continue using the site. Learn more…