home-assistant / home-assistant/android

Network location is polled instead of using NetworkCallback

Open
#7,471 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Kotlin
Stars
3.9k
Forks
1.1k
Avg merge
1d 12h
Merged PRs (30d)
81

Description

**Home Assistant Android app version(s): 2026.6.5-minimal (F-Droid)**

**Android version(s): Android 15/LineageOS 22.2**

**Device model(s): Motorola G7 (river)**

**Home Assistant version: 2026.5.4**

**Description of problem, include YAML if issue is related to notifications:**

The app is constantly (every 30s or so) accessing location service (even if it is told not to: Remote connection security level → Less secure: Do not allow this app to know whey you are home). This may or may not impact battery life. However it definitely is annoying when a the notification area at the top of the screen is brought to front on top of a full screen app (e.g. a video player) with a green bubble indicating access to the location service.

I am not an Android developer, but there seem to be [a better way](https://developer.android.com/develop/connectivity/network-ops/reading-network-state?hl=en) for an app to know network connectivity status than polling every half a minute.

Syncthing is an app I use daily which [appears to be using this API](https://github.com/chenxiaolong/BasicSync/blob/cd0fbad38eb9699323ce2aacee868bf2bfa5ee25/app/src/main/java/com/chiller3/basicsync/syncthing/DeviceState.kt#L349) and indeed it works as advertised with regard to detecting network conditions and I haven't seen it polling like HA.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the app's network-connectivity polling and compare it with the Android NetworkCallback guidance linked in the report. Reproduce the roughly 30-second location accesses on Android 15/LineageOS 22.2, then verify that connectivity changes are detected without periodic polling and that the unwanted location indicator no longer appears.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile-dev, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.