This object is in archive! 
Android 30, access to file-system
Answered
Hi,
Are you able to share with me how Locus built for API30 will be able to load offline maps such as mbtiles and gems?
Are you going to request the manage storage permission, or have you found some way to load an mbtiles file or gemf file from shared storage?
I believe that both mbtiles and gems need access through the File API to be loadable.
Thanks,
Bill
On Mon, 10 Jun 2019, 14:44 Locus Map, <locus.map@asamm.com> wrote:
Hello Bill,
firstly, I've changed your question to public topic, because I'm sure, it will be interesting for a lot of users.
Seems you are well informed about coming changes.
Unfortunately, you are correct. SQLite databases require direct java.io.File access that is no longer possible on modern Android devices.
Since November, we are no longer able to publish an application version that will have access to the filesystem as before. So the next Locus Map version will require the full transfer of the whole app directory to its private storage for all Android version 11+. I'll be then working on some options how to for example import any data from the "Download" directory etc.
Custom maps will be still possible in the case, you copy them to the app private directory. As I test it, it is possible with updated file browsers like with "Solid explorer" and probably many others.
Feel free to ask if there will be any additional questions.
Jiří M. aka Menion
Hello Bill,
firstly, I've changed your question to public topic, because I'm sure, it will be interesting for a lot of users.
Seems you are well informed about coming changes.
Unfortunately, you are correct. SQLite databases require direct java.io.File access that is no longer possible on modern Android devices.
Since November, we are no longer able to publish an application version that will have access to the filesystem as before. So the next Locus Map version will require the full transfer of the whole app directory to its private storage for all Android version 11+. I'll be then working on some options how to for example import any data from the "Download" directory etc.
Custom maps will be still possible in the case, you copy them to the app private directory. As I test it, it is possible with updated file browsers like with "Solid explorer" and probably many others.
Feel free to ask if there will be any additional questions.
Jiří M. aka Menion
Hi Menion,
I think we might be able to do something with the gemf archive format on Android 30. I have successfully got a file input stream from a URI to a gemf and read its header. The traditional Android gemf reader code used a random access file, but I think a simple file input stream will suffice, though may not perform quite as well.
Bill
Hi Menion,
I think we might be able to do something with the gemf archive format on Android 30. I have successfully got a file input stream from a URI to a gemf and read its header. The traditional Android gemf reader code used a random access file, but I think a simple file input stream will suffice, though may not perform quite as well.
Bill
Have you considered applying for manage files permission for Locus? Given that Google's API changes have essentially prohibited sharing map archives between apps which is a reasonable thing to want to do, especially with large archives.
Bill
Have you considered applying for manage files permission for Locus? Given that Google's API changes have essentially prohibited sharing map archives between apps which is a reasonable thing to want to do, especially with large archives.
Bill
So future versions of Locus will have to make a copy of offline maps into local storage. These may easily be many Gb in size and take a long time to copy. A GEMF may comprise several files. If a user has more than one offline Map App installed, each will have to do the copy.
I still don't quite understand why Google have it so that if the user grants access permission to a folder, why File I/O can't be used for non-media files.
Bill
So future versions of Locus will have to make a copy of offline maps into local storage. These may easily be many Gb in size and take a long time to copy. A GEMF may comprise several files. If a user has more than one offline Map App installed, each will have to do the copy.
I still don't quite understand why Google have it so that if the user grants access permission to a folder, why File I/O can't be used for non-media files.
Bill
This is correct, every app will have to use own copy. But this is something I do not consider as a problem. My expectation is that every user use mainly one favorite app.
And why Google did it? Security reasons in most cases + trash that every app left in the device when un-installed.
I spend on this maybe 2 months of various testing, but I fully understand this change to be true ...
This is correct, every app will have to use own copy. But this is something I do not consider as a problem. My expectation is that every user use mainly one favorite app.
And why Google did it? Security reasons in most cases + trash that every app left in the device when un-installed.
I spend on this maybe 2 months of various testing, but I fully understand this change to be true ...
Replies have been locked on this page!