Golub

Testing & troubleshooting

Simulated location stops when the screen is off: battery fix by brand

Last reviewed: · 2 min read · Menu names vary by brand and Android version.

Short answer

If a simulated location stops when the screen turns off, the phone's battery manager is pausing the app. Set the app's battery usage to Unrestricted in Settings › Apps › the app › Battery. On Samsung also remove it from Sleeping apps; on Xiaomi set No restrictions and allow Autostart; on vivo allow high background power use.

Loads from YouTube (youtube-nocookie.com) only when you press play.

Step by step: Keep a location app running with the screen off

  1. Open the app's settingsOpen Settings › Apps and choose the app (or long-press its icon › App info).
  2. Set battery to UnrestrictedOpen Battery (or App battery usage) and choose Unrestricted.
  3. Apply your brand's extra settingSamsung: remove it from Sleeping and Deep sleeping apps. Xiaomi: Battery saver › No restrictions and turn on Autostart. OPPO/realme/OnePlus: allow background activity and auto launch. vivo: allow high background power consumption.
  4. Test with the screen offStart a simulation, lock the phone for a few minutes and check that it's still running when you come back.

Why it stops

Android pauses background apps to save battery (App Standby and Doze), and many brands add an even stricter layer. A location simulation is a background job, so the battery manager may stop it a few minutes after the screen turns off.

Quick fix by brand

BrandWhat to change
All phonesApp info › Battery › Unrestricted
SamsungSettings › Battery › Background usage limits › remove from Sleeping apps and Deep sleeping apps
Xiaomi, Redmi, POCOApp info › Battery saver › No restrictions, turn on Autostart, and lock the app in Recents
OPPO, realme, OnePlusApp info › Battery usage › Allow background activity and Allow auto launch
vivoSettings › Battery › Background power consumption management › Allow high background power consumption
Pixel, MotorolaApp info › Battery › Unrestricted is usually enough

Labels vary by Android version and region. If you can't find one, search the label in Settings.

What Golub does for you

Golub runs simulations as a foreground service with an ongoing notification, keeps running if Android closes the app, and tells you if a simulation stops. The settings above remove the remaining cause: the brand's battery manager.

Frequently asked questions

Will this drain my battery?

Only while the app is actively running a simulation. When it's stopped, an unrestricted app uses no more power than before.

How do I know the simulation stopped?

Golub shows a "Your simulation stopped" alert when Android stops it, so you know to check these settings.

Why do some brands need extra steps?

Many manufacturers add their own battery manager on top of Android's. Each one has its own switch, so the universal setting alone may not be enough.

Is there a list for every phone model?

The independent site dontkillmyapp.com documents background limits for many brands and models.

For testing, development and personal use. Please respect the terms of the services you use.