microg / microg/GmsCore

[com.google.android.apps.maps] GMaps background location sharing don't work

Open
#3,325 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
14.6k
Forks
3.2k
Avg merge
12d 11h
Merged PRs (30d)
4

Description

**Affected app**
Name: Google Maps
Package id: com.google.android.apps.maps

**Describe the bug**
A clear and concise description of what the bug is.
Since some time, background location sharing just don't work after you close the app from the foreground, and you appear "Offline" on the Google Maps. It was working just fine a few months ago. After you reopen the app, it refreshes your location, but after some time, it goes back again to the offline state.

I disabled battery restriction for the app, set it to without restrictions.
There are 4 permissions enabled for the app: Location (always active), Physical activity, notifications, Nearby devices. There are no errors about the location on the app while selecting sharing location. I fully disabled battery saver.

I wanted to mention that the app shows in the last used location menu of the settings as few minutes ago like it really is working in the background, but now I checked it and it shows 14 hours ago. Weird, recently it showed a few minutes ago, and the state was indeed Offline on the other device that location sharing is enabled to.

Home Assistant app refreshes location just fine in the background.

**To Reproduce**
Steps to reproduce the behavior:
1. Click on pfp in right upper Corner.
2. Click on sharing location and enable it.
3. Close app and let it work in the background.
4. For others, your location is "Offline"

**Expected behavior**
Location sharing in background works just fine.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**System**
Android Version: 16
Custom ROM: LineageOS 23.2
Device : alioth
**microG**
microG Core version: 0.3.13.250932
microG Self-Check results: All besides interact with work profile.
Location settings in microG: every option ticked. Using Position, tried BeaconDB, didn't help
Location settings in phone's settings: wifi and bluetooth scanning turned ON

**Additional context**
Add any other context about the problem here.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Begin by reproducing the background location-sharing failure on Android 16 with LineageOS 23.2, microG Core 0.3.13.250932, and device alioth, then trace the relevant location-sharing behavior. Done means Google Maps remains online and continues sharing location after the app is closed.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.