Android 11+, changes

Started by Menion, November 26, 2021, 12:13:57

0 Members and 1 Guest are viewing this topic.

Menion

Hi guys,

there were not too many changes in the Android itself during last years, that affect Locus Map. The big one was of course battery optimizations  :o.

And now, tadá, we have another one as most of you know.

A11+ devices bring a limitation in access to the device file system. Task, which firstly was not looking so complicated, in the end, took more than a month of work for me and half of the Locus team.

I started this topic so I may answer and discuss any changes that the next update brings independently on the main app version topic(s).

----

Summary
- app can no longer access the root of the internal memory directly, only over very limited so-called "Scoped storage" access. This brings some limitations. Mainly fact that the neesd to move its main directory to the private storage (/android/data/...). Also no support for the custom "srtm" and "mapsVector" directory, no support for custom "geo tagged photos" directory, and no support for "external maps" defined over the app.

- app can't directly detect installed apps, so the content of the function panel may be limited

---

Michal is already writing a bigger blog post & manual for a better understanding of these changes and how to solve the most common use-cases.
You may watch the creation process of the main manual page in progress here.

Feel free to ask here, I'll gladly answer.

I'll also today finally publish the new Beta version where all these changes will be presented.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download

balloni55

Hello menion,
thank you for your detailed explanation, although this will be devastating for many users.

A comment in the linked instructions is not always correct:

You have to move the maps to /Locus/Maps/ directory manually via the system file manager.

The file manager of my device "Samsung Xcover 4S" has no acces to Android/data ! :o
with e.g. "X-plore" or "Total Commander" i´m able to manage these folders
Locus Map 4.26.3.1 Gold AFA

LM4 User ID e06d572d4
  •  

Menion

Really no access? Surprising. I'll inform Michal about some inconsistencies, thanks.
Import of the map will be implemented directly over the app next weeks. I had no time to do it yet. The solution is similar to the import of GPX etc. just app copy map into the proper directory.

And devastating ... well, as I work on it last weeks, I've ended with the (my) opinion that it is not a problem at all. I do all the necessary tasks I did before on my device and no problem. Only that the directory is not directly in the root of the device memory so it takes a few more clicks to find it ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

balloni55

regarding "devastating"  I mainly meant the memory consumption of the internal SD
Locus Map 4.26.3.1 Gold AFA

LM4 User ID e06d572d4
  •  

Menion

Ah understand.
You may put the whole directory on the SD card! If you use a faster SD card, I believe it will be fast enough. But it needs to be tested, I've not tried it to be true ...

- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Michal

To be honest, I would rather not rely on SD card with its "ability" to handle database fast random read/writing, its stability etc. Not long ago I lost all my data on an SD card due to its malfunction and the necessity of formatting.
PR/support & UXW & copy, Locus team, Asamm Software, Prague
  •  

Menion

Hmm right. So maybe we should start recommend devices without SD card and bigger internal memory ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

michaelbechtold

I'm really shocked that none of the geo app providers joined forces and went up in arms to wake up Google.
The limitations are a disaster, as explained many times.

As far as I understand an existing Locus install (BEWARE OF UPDATES!) will continue to use full power of the existing app, right?
  •  

michaelbechtold

Quote from: Menion on November 26, 2021, 15:47:40
Hmm right. So maybe we should start recommend devices without SD card and bigger internal memory ...

And this is a BAD joke, Menion. In fact not a joke at all.
  •  

michaelbechtold

Quote from: Michal on November 26, 2021, 15:05:30
To be honest, I would rather not rely on SD card with its "ability" to handle database fast random read/writing, its stability etc. Not long ago I lost all my data on an SD card due to its malfunction and the necessity of formatting.

I appreciate your twofold warning, Michal!

Question to Menion:
I saw that many apps have a /Android/data folder on external SD, BUT their working directory in fact is on internal storage.
Are you able to access BOTH of them simultaneously? E.g. SRTM and large maps on external SD, while databases and other essential objects with high performance and reliability needs are kept on the internal /Android/data storage.

arnor

Just for my clarity:

Did I understand correctly that:
- both app and userdata may no longer be placed in the root directory.
- this means that userdata such as srtm and vector should no longer be in the root.
- this means that app and data must be in the private directory /android/data.
- that the app and data may be on the sd card, but only in the private directory.

Is it then possible to divide app and data over private directories in internal memory and SD card? For example the app with important data such as the database in the private folder in the internal memory and for example the srtm and vector folders in the private memory of the sdcard?

I personally like to have data (such as documents, books, photos, vector maps, etc.) together in such a way that a backup can easily be made and in my case all on the sd-card.

By the way, where could I find information about the devastating reasons behind this new setup in Android 11+. Maybe then I can understand. Years ago, I got rid of my Apple iPhone because I felt Apple was being too "protective" with regard to data I owned. Can I do what I want with it. I know; this is not the address where I should file my complaints. You can't do anything about it either. Fortunately, I know that you will do everything you can to keep things running smoothly. Thanks for that.
  •  

arnor

Sorry, I just saw that someone else has just beaten me to a similar question.
  •  

Viajero Perdido

#12
"no longer"

What about Android 10, 9, 8, ...?

I had a bad dream a few weeks ago where the app (beta?) surprised me with a notice that something had changed (I never changed anything!), I experimented with the "new normal", didn't like it, then changed it back.  Did that really happen?  Do I have to care about this if I don't have Android 11?
  •  

Menion

@michaelbechtold
we discussed this earlier and I have to repeat myself. Changes introduced now for internal memory were introduced 7 years ago for SD cards. They (these changes) complicate life to me, to our team, to many users also, but they make sense. There is also no serious reason why Google should grant an exception to the Locus Map app, sorry to say this.

And yes, version 4.4.3 is the last with the "full" access to the internal memory.

App has access to the private directory in internal memory and the SD card as well, so yes, this is an alternative solution to discuss > placing some data to private dir on the SD card.

@arnor
"both app and userdata may no longer be placed in the root directory" - correct
"this means that userdata such as srtm and vector should no longer be in the root" - correct
"this means that app and data must be in the private directory /android/data" - correct
"that the app and data may be on the sd card, but only in the private directory" - correct

"Is it then possible to divide app and data over private directories in internal memory and SD card" - not yet. If there will be bigger interest, I may work on it and this is definitely a doable task.

You may find a lot about it on the internet. The fact is that Google is step by step going the same restrictive way as Apple. As I do not know apple devices, I have no idea how far it goes now ...

@Viajero Perdido
There should be no changes on Android 10. If anyone notices any, it is definitely not an intent, so let me know.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

michaelbechtold

Menion, you never really convinced re. below points! So, pls. ask Google via your DEV account those questions:

- how to share a DATABASE of 1GB+ between two compatible apps (they have no right to play LM4 XOR LMP - not their business, it's user's choice)
- how to share double digit data files (non-media!) between apps (like SRTM data or large map files (vector and raster); apps from different developers.

Looking forward to their answer.
  •