Puremaps offline and OSM Scout server
-
Oh well, it was worth asking in case there was a setting I had missed. Thanks for the explanation.
-
Manually starting OSM Scout server is not very user friendly indeed, but there are more annoyances when using the Pure Maps/OSM Scout Server combination. For instance when you search for a location, Pure Maps won't get any answer until you manually switch the screen to OSM Scout server and back again to Pure Maps. Screen switching is also required while Pure Maps is routing you and needs re-routing to be computed. You surely realize that needing to switch screens is NOT SAFE while driving...
AFAIU the reason is that when OSM Scout Server is in the background it is actually suspended (and hence unresponsive to Pure Maps queries) in Ubports. In SailfishOS where I come from, this was working flawlessly.
I also have the same sort of frustration when using "activity tracker" : it stops logging your position when the screen goes off. Again, this was working in SFOS.
As a result, from where I come, UBports seems a particularly crippled linux. Are there way that a user can decide that some apps should remain awake when in the background? If not, could provisions be made in the OS, in the containerization or whatever so that becomes possible? -
I discovered today that you can suspend app suspension of Activity Tracker and OSM, amongst others, using UT Tweaks Tool. I have not tested their use yet.
-
Hey many thanks for the tip!
I guess certain apps should be allowed to set this as default behavior on their own (without manual operation in UT Tweaks Tool which, moreover, is not part of default apps). -
@slowcyclist
Yes, UT tweak tool make it possible, but this is not a viable solution.
As I explained, confinement is the key.This is something a UT user would want because that is a core feature of the OS.
Having an app running in the background might be convenient in some cases like GPS tracking and I share your frustration.
No background activity is a key to longer battery life and is also part of the UT experience.
But unless a clean way to have the feature is found, this will be a hacky solution to a design problem.
IMO, that something that should be worked on instead of trying to hack around, so if someone can propose something I bet PR will be welcome.Porting apps to UT is not trivial and requires some compromises if the app was not intended for UT in the first place.
The best experience UT can offer is with native apps.BTW switching apps is not safe while driving, but neither is looking for a destination. You should stop to start a new route.
-
@AppLee said in Puremaps offline and OSM Scout server:
IMO, that something that should be worked on instead of trying to hack around, so if someone can propose something I bet PR will be welcome.
Porting apps to UT is not trivial and requires some compromises if the app was not intended for UT in the first place.
The best experience UT can offer is with native apps.BTW switching apps is not safe while driving, but neither is looking for a destination. You should stop to start a new route.
So how and where do I go about proposing something new? Fully functional offline Puremaps with GPS tracking would be a great improvement. I admit here and now that I don't have the faintest idea of the difficulties involved, and I am getting the impression it may not even be possible.
Ideally I would like to see an Ordnance Survey map application as they are the only maps to show the sort of features I want, but I recognise they would only appeal to those of us in Britain, so there may not be enough demand to make development worthwhile. (For information: OS maps show features such as footpaths, contour lines, field boundaries, archaeological sites and so on, that are of interest to walkers, while roads are merely incidental to the important data.) https://www.ordnancesurvey.co.uk/
-
@cliffcoggin
You can start there: https://gitlab.com/ubports/core
I don't have a better pointer but I guess you can find an entry point with the GPS indicator in the top bar.I don't really know the specifics, but I guess if someone can come up with a design where GPS data are collected and stored at a given frequency it would be a start.
Then app developers will need a way to start/stop this collection if they have GPS privileges and a way to access the result.
The GPS service should also be able to filter data so the only time frame the app will get access to is during the app execution time. So if app A is running and app B is not, running app B later, the latter won't have knowledge of earlier localization data.That should work for the GPS service and tracking abilities.
To get offline data seamlessly it requires two things:- The ability to run while asleep
- The ability to run while in background
Running in background is made possible with UT Tweak Tool, so this could be integrated.
Running an app while the phone is in sleep mode is probably more difficult but an app can prevent the phone to go to sleep so maybe that's enough.So IMO that's doable, just need someone brave enough to dive and do the heavy lifting.
People with better knowledge of how the OS works can correct me if I'm wrong. I never dug into the specifics... (yet ?!)
-
@AppLee said in Puremaps offline and OSM Scout server:
BTW switching apps is not safe while driving, but neither is looking for a destination. You should stop to start a new route.
Pure Maps routing can speak out vocal instructions so you don't have to look at the phone. And when you get off the route, it it queries the router for a new route without having to touch the phone. No usability or security issues there. I have been using it in SFOS since Pure Maps existed and it works extremely well, on par with proprietary softwares doing this in Android. The only thing missing is real-time traffic.
No background activity is a key to longer battery life and is also part of the UT experience.
However great "features" may confinement and background suspension be in theory, as long as they prevent doing what people expect from a phone nowadays (including routing and tracking), I don't think we will be able to convince ordinary folks to switch to UBports to get that user experience. Other phone OSes (SFOS, PureOS) manage these things differently and transparently for the user, and I think UBports should aim to be at least on par with these in terms of real-life user experience. I acknowledge it's probably non trivial and requiring a lot of work, but I would set it a high priority.
Regarding suspension being good for battery life, I can testify that when my phone ran SFOS (where backgrounded apps are not suspended) I had a noticeably longer battery life than now with UBports, so there is no hard evidence that backgrounded apps (when properly coded) are so detrimental. When I want to use GPS in the background (or asleep), I do expect to have higher battery drain, and accept it. Being forced presently to run GPS-using app with screen on induces obviously a far worse drain.
-
I also think for daily use we need something like OsmAnd with offline maps and navigation, hill shades, contour lines and the OSM Maps with all its details like hiking paths in one app.
-
@herr-b In Pure Maps you can choose among many map backgrounds, including OpenTopoMap that has contour lines, hill shadings and pathes. OpenCycleMap is pretty good too.
For offline mode, Pure Maps queries data (maps, names, addresses...) on the phone from OSM Scout Server (instead of from network servers), assuming the corresponding data was previously download on the phone. OSM Scout Server presently serves only standard OSM maps but serving other, more detailed maps is being investigated and may not be too far away from becoming a reality.
-
@slowcyclist thanks for the hint with the OpenTopoMap, I saw it, when I once went through the settings but then forgot. If you choose the icon for the map type on the map, it does not show all the possible maps. May be there are to many possibilities to display them all.
But I would really prefer to use a offline vector map, instead of raster maps, that I can put on the external SD card and have more control over downloads (I don't have flat data package on the phone) and used memory space on the phone.
-
I conducted an experiment today to assess power consumption with Puremaps in offline mode, OSM Scout running without suspension, and Activity Tracker running without suspension and sampling every 20 seconds. On a 40 minute journey the battery dropped from 95% to 49%, approximately 1% power drop per minute. That is clearly not a viable way to use the phone so I shall explore other options.
AppLee. I'll investigate your pointer more thoroughly, though at first glance I can not see a way forward. I'll report back after more study.
-
A second experiment to day showed the power consumption to be much less if I do not use Activity Tracker.
With Puremaps in offline mode and OSM Scout prevented from suspension the battery lost 21% over 105 minutes. That equates to 0.2% per minute which, while not good, makes it viable for short journeys.
I looked further at the Gitlab site and could make no sense of it as there are too many terms and concepts I don't understand, so I shall not pursue the idea of a new suggestion there.
-
Activity Tracking worked in my tests only, if the screen doesn't lock. As soon as the screen locks, Activity Tracker does not work any more. For car driving this is no problem but for hiking this is useless.
-
@herr-b You can allow Activity Tracker to run in background with UT Tweak Tool.
-
Yes, I already allowed Activity Tracker to run in the background with UT Tweak Tool. Today I made tests again, the first test worked, the activity was recorded the whole time. The second test did not work. Track recording was stopped when the screen was locked ... I have to test again to find out what's the reason for this behaviour.
-
I have not read the whole thread. All these limitations will go away some day. OSM Scout Server can be triggered automatically in background when Pure Maps tries to reach it (via a systemd socket). So no need to manually disable app suspension, no need to manually start OSM Scout Server and no need to close it afterwards. All this is already supported by OSM Scout Server and Pure Maps and will be available once we got Systemd in UT.
The OSM Scout Server will need to remain unconfined unfortunately.