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

Apps using PlayServices for location cannot get location using GPS #1648

Closed
ghost opened this issue Jan 27, 2022 · 10 comments
Closed

Apps using PlayServices for location cannot get location using GPS #1648

ghost opened this issue Jan 27, 2022 · 10 comments
Labels

Comments

@ghost
Copy link

ghost commented Jan 27, 2022

Describe the bug
Certain apps seem to be dependant on PlayServices for location. These apps fail to get the GPS position from microg but have no problem getting location based on networks arround it. In other words when a certain location module is enabled, it gets location based on it (the accuracy is obviously very low). But when all location modules are disabled the apps don't get any location at all. Again, only those apps that require PlayServices for location have a problem. For example GPSTest or My Location (both apps from FDroid) don't have this problem and are able to get GPS coordinates without any issue. This is proved by the fact that when apps that don't require PlayServices for location get their position, they appear in settings as the only app that requested location during the usage time frame. On the other hand apps that need PlayServices for location appear in the location history together with MicroG to have requested location at the same time. After about 30 seconds both apps stop requesting location.

To Reproduce

  1. Switch off all location modules in microG
  2. Use an app that requires PlayServices for location (can be Mapy.cz, found on google play)
  3. Try and get location
  4. No location is found

System
Android Version: 10
Custom ROM: LineageOS 17.1 (microg fork)
Device: Ginkgo (Xiaomi Redmi Note 8)

Additional context
The issue was already disscussed here but it was in the wrong repo.
The part about being dependant on PlayServices for location might be wrong. It might be a completely different issue but to meet it seems like it.

@ghost ghost added the bug label Jan 27, 2022
@dragnev-dev
Copy link

Mapy.cz works for me. Can you please make sure that you have done the extra step in the installation instructions for location support. I suspect that is the reason for your issues.

After you do it, reboot, redo the self-check in microG settings, reboot again. You might need to reset app data for Mapy.cz so make sure you back up any data you might lose, delete app data, and run it again.

@ghost
Copy link
Author

ghost commented Feb 1, 2022 via email

@ghost
Copy link
Author

ghost commented Feb 13, 2022

Force stopping microg and clearing the cache fixed the issue and now it all works as intended. I will not close the issue yet but will wait and if I exprience any issues during the next week and close the issue then if I don't encounter any issues.

@ghost
Copy link
Author

ghost commented Feb 15, 2022

The issue didn't appear again. I have no idea what caused the issue but it's fixed so there is no need to solve anything. It might have been LineageOS for microg but that's honestly just a guess.

@ghost ghost closed this as completed Feb 15, 2022
@Iey4iej3
Copy link

Iey4iej3 commented Jun 3, 2022

I encountered a similar issue. Not for the Apps relying on PlayServices but OsmAnd.
MicroG cannot provide network location after days of usage. My Location tells me that the Network location is missing but UnifiedNLP Backends have locations (maybe obtained through different APIs). It is solved by rebooting (but after several days, the issue reappears). Now I checked that forcing close and cleaning cache also works. Let's see whether this solves the issue permanently.

@g-a-b
Copy link

g-a-b commented Feb 21, 2023

This issue should be reopened since the problem isn't fixed.

I face this very precise problem. Sometimes Google Maps can only display Network Location whereas sometimes it succeeds in displaying GPS Location. I found two workarounds so far: a reboot of the device or a forced stop of Microg process.

@Iey4iej3 could you confirm you're still facing the problem?

This issue may have been fixed by 24b0bfa as mentionned in #1517 but I can't test it since /e/ does not embbeds v0.2.27.223616 so far.

Android Version: 12
Custom ROM: /e/ 1.8.1
Device: beyondlte0 (Samsung S10e)

@Iey4iej3
Copy link

@Iey4iej3 could you confirm you're still facing the problem?

As far as I remember, I no longer reproduce this issue.

This issue may have been fixed by 24b0bfa as mentionned in #1517 but I can't test it since /e/ does not embbeds v0.2.27.223616 so far.

You can simply install this version to test (system apps could be updated via installing an updated apk, say, via F-Droid).

@g-a-b
Copy link

g-a-b commented Feb 21, 2023

You can simply install this version to test (system apps could be updated via installing an updated apk, say, via F-Droid).

It's on the phone I use daily. I don't want to break anything doing things I don't understand. And indeed I don't really understand all that underlying stuff.

@Iey4iej3
Copy link

I don't want to break anything doing things I don't understand.

This is undo-able, and in general, it makes sense to keep apps up to date.

@skbnoqtrjf
Copy link

Mapy.cz works for me. Can you please make sure that you have done the extra step in the installation instructions for location support. I suspect that is the reason for your issues.

After you do it, reboot, redo the self-check in microG settings, reboot again. You might need to reset app data for Mapy.cz so make sure you back up any data you might lose, delete app data, and run it again.

could you tell me how to install that "additional patch"?
image

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

No branches or pull requests

4 participants