Well, I was able to reproduce it. I also have a response from support:
This may happen if the location permission given to the app was “While using the app”. In that case, shortly after the screen turns off, it’s not actively being used and the location service will turn off. Thus, I would suggest to check your permissions for the apps concerned!
I set it to Allow all the time and I plan to test it in approx. an hour when I’ll be driving.
Agreed. I tried it with the location permission set to “Allow all the time” and sure enough, it worked even when I turned the screen off. It seems that since Android 10, apps must specifically ask for the background location permission (android.permission.ACCESS_BACKGROUND_LOCATION), more info here.
We might eventually make a new wiki page with common issues that are not strictly related to Fairphone (e.g., permissions in new Android versions, features that are not in vanilla/FP Android but people are used to them from other phones, etc.).
Sounds like a plan. Also the lack of VoLTE support with some carriers causes issues that are not universal enough for that wiki I started. But could be something for a wiki you mention. As well as SD card issues.
I also have a similar problem, but with a different application - the Beeline motorcycle navigation.
I have been in contact with the developers of the application and they have informed me that they are not using the android.permission.ACCESS_BACKGROUND_LOCATION, instead they are using the standard foreground permissions, even when the screen is turned off. There is no “allow all the time” option available for this application.
The phone seems to kill the process anyway and the navigation gets very infrequent location updates while the screen is turned off. I have already investigated location permissions and battery optimization settings. I wanted to attach them here as screenshots for completeness, but new users are restricted. I guess one screenshot showing the approximate frequency of location updates will be enough for now.
Here is citation from the Beeline developer
Background permission doesn’t mean when your app is in the background. Background location updates are a special case for apps requiring location updates when the app is not running. Our app is running when navigating, so we correctly use the foreground permission using a foreground service. Changing to background permission would not change anything. It’s likely the choice of phone is to blame here or they haven’t excluded our app from being killed by the battery manager.
Anyway, if you require more information to investigate this issue please let me know.
I expect the others will get back to you but in any case you should #contactsupport . Make sure you include the comments from the Beeline dev. From what you wrote it looks like you’ve already checked things covered in this topic.
It may be that the FPOS is not implementing permissions as it should.
indicate the build number of the OS version that you are running
Google maps works fine, but it actually uses the background permission, which the beeline appliaction does not. The background data is gathered at higher frequency than in the Beeline screenshot, although it still looks a little lower than I would expect. But that’s background, and Beeline is supposed to run exclusively in foreground. In foreground, with navigation active, whether with the display turned on or off Google maps work just fine and the turn-by-turn directions arrive on time.
Yes, if it’s not working when not visible, I rather get the impression that Beeline should be implementing a foreground service (as per the Android documentation referred to above by Razem). When the app is running but not visible, do you see a “Location” icon in the status bar? If not, then the app has neglected to declare the foreground service type of Location, which it appears is obligatory from A10 up.
I have the same problems with Google Maps and OruxMaps. The trick of allowing permanent access to location worked for Google Maps but not for OruxMaps. I see no icon in the status bar signaling a foreground service is implemented.
Nevertheless, OruxMaps has many users in Spain and I find it weird that the issue hadn’t been already addressed. Moreover, OruxMaps began to fail for me in my old Fairphone 2 when I upgraded to Android 9.
I will search more information specific to OruxMaps. If I find something useful I will post it here (just in case it helps with the Beeline problem). If not, I will open a support case.
I’m having major problems with Google maps. I normally connect my phone to a third party helmet Bluetooth device on my motorbike helmet and run maps in the backround with the phone locked. Every other phone for the last 10 years worked fine this way but for some reason this phone shuts the GPS module down when the screen shuts off… is there a way of preventing this from happening?
The problem seems to be intermittent. Right now it works for me, but I have no idea for how long. I think it has stopped working around three time now, all of them on the Fairphone. My solution is to always bring an older backup phone which never exhibited this behavior, just in case it stopped working mid-trip.
Clearly the issue is on Fairphone’s side, but since it works most of the time I cannot be bothered to keep fighting this problem.