Ben Konyi
Ben Konyi
Sep 23, 2018 · 1 min read

What I ended up doing was setting a geofence of 1km around my house which would “promote” my service to a foreground service and trigger frequent location updates to more accurately determine when I was within 100m of the house. To get things working consistently, I eventually realized that doze mode was causing issues and turned off background battery optimizations for the application (see StackOverflow post below for details.

https://android.stackexchange.com/questions/129074/is-there-a-way-to-exclude-an-app-from-doze

    Ben Konyi

    Written by

    Ben Konyi

    Google Software Engineer — Dart VM Hacker, Flutter Runtime Dev, Amateur Cyclist, and Proud Canadian 🍁