Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 10 / LOS 17.1: Requests location every 60 seconds #55

Open
pjaap opened this issue Oct 12, 2020 · 6 comments
Open

Android 10 / LOS 17.1: Requests location every 60 seconds #55

pjaap opened this issue Oct 12, 2020 · 6 comments

Comments

@pjaap
Copy link

pjaap commented Oct 12, 2020

Hi. I'm using Lineage OS for MicroG 17.1:

The Mozilla UnifiedNLP requests the location every 60 seconds if I enable location services. It shows the GPS icon for a few seconds and this repeats every minute.

In the location settings I figured out that the requests are made by Mozilla UnifiedNLP.

The behavior stops if I allow the location permission only if in foreground, but, unfortunately, the NLP stops working at all then.

What can I do to debug this issue?

@kaoneko
Copy link

kaoneko commented Nov 26, 2020

Hi, I noticed the same but with the AppleWifiNlpBackend. It seems to coincide with lines like

LOWI-8.6.0.33: [LOWI-Scan] lowi_close_record:Scan done in 13424819ms, 20 APs in scan results

when viewing logcat, which also occur when the NlpBackend is turned off (the location icon being shown for a few seconds only happens with the NlpBackend on though). I think this LOWI-Scan is just the normal scanning for wireless networks.

It doesn't coincide with log messages from AppleNlpBackendService, which only occur when actually using location in an app, e.g.

AppleNlpBackendService: onOpen
AppleNlpBackendService: Found 20 wifis, of whom 18 with location and 1 unknown.
AppleNlpBackendService: Requesting Apple for 1 locations
AppleNlpBackendService: Found 20 wifis, of whom 19 with location and 0 unknown.
AppleNlpBackendService: onClose

But indeed, when you go to Settings > Location, although the UnifiedNlp backend isn't shown under Recent location requests, when you tap App permission it will indeed show that, in my case, Apple UnifiedNlp Backend last accessed location this or the previous minute. When you actually use location in an app, what's shown under Recent location requests in Settings > Location is microG Services Core.

So what's going on here? Is the Mozilla or Apple backend just taking notes whenever a new wifi scan happens, without contacting Mozilla / Apple? I'd like to think so, but I'm just guessing here.

Note that what OP describes also stops happening when I turn off wifi (I have no SIM card in the phone so there is no data connection).

Hope this helps anyone...

@breversa
Copy link

How did you manage to get this to work in the first place ? I'm having #52 on LineageOS 17.1…

@pjaap
Copy link
Author

pjaap commented Jun 15, 2021

I simply installed the "official" build from https://lineage.microg.org/ and ran the self-check in the MicroG app. A one point in time I had to clear the cache of the NLP backend to make it work again (after an update). Wifi+Cell location are working. It takes a few seconds. Best way to check is "Sat-Stat" from F-Droid.

@breversa
Copy link

breversa commented Jun 15, 2021

Thanks for your fast reply. I'm a long-time user of Satstat myself, but there's no LineageOS for MicroG for my device, so I installed MicroG via https://github.com/FriendlyNeighborhoodShane/MinMicroG_releases.

It works fine for other location backends but not MLS…

EDIT :
SOLVED : #52 (comment) !

@daniellandau
Copy link

I recently installed Android 12 (lineageos for microg 19) and the location notification is green, more prominent and takes full screen video out of full screen. Any idea where this should or could be fixed? I haven't used Android with Google in years, but I can't imagine it would have this issue.

@pjaap
Copy link
Author

pjaap commented May 30, 2023

The GSM Core release https://github.com/microg/GmsCore/releases/tag/v0.2.28.231657 resolved this issue for me.
The Mozillla NLP is now directly integrated into GSM Core and works flawlessly. Tanks for the effort 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants