SDK 29 has the following feature:
- No permission to access File.DirRootExternal, even with the STORAGE permission.
There's workaround for the manifest files, but it's temporary and issue will just be postponed to SDK 30.
I have suite of apps, composed by 2 different apps:
- a "writer", that writes data in a SQLite database
- a "reader", which access the database for data extraction and reporting
Until now, I was able to create a directory right under DirRootExternal, where the "writer" could create and populate the database, and the "reader" could subsequently read back data.
This needs to be changed for Android 10+.
While I understand the security reason behind not allowing one app to access data belonging to a different one, what alternative options are available?
Database can grow large, so sending it back and forth the 2 apps, doesn't seem to be a viable option.
Looks like a FileProvider use case, but current user workflow doesn't include a "sharing" action to send data from the "writer" to the "reader": user should be able to run the "reader" as he likes, and access data written by the "writer" anytime.
Does the "writer" have to create the DB in the "shared" directory of the FileProvider class?
And how can the "reader" address the previously defined "shared" directory?
Do I need to merge the "writer" and the "reader" into a single app, so the data sharing won't be necessary anymore, since the DB will be in the private directory of the app itself?