====== Why Locus loses fixed GPS location or is killed by OS in standby mode ====== ---- More and more users have been reporting issues with **losing GPS signal** during track recording when their device goes standby, resulting in direct lines instead of accurately recorded tracks. **What to do to avoid it?** ===== Allow Locus to access GPS any time ===== The operating system must be set for Locus Map **NOT to switch GPS off in standby mode** (when the display goes off). Android 10 goes even a bit further: ==== Android 10 ==== This OS version divides permission to access GPS location into three modes: * **no access** - the app is unable to get accurate location ever * **only when the app is used** - Locus Map can get GPS location only when the display is on and Locus is "used", i.e. manipulated directly on the screen. When the display goes off, Locus loses the GPS location and can't record tracks, navigate, share location in real-time over Live tracking, etc. * **all the time** - the only mode in which Locus Map is permitted to run correctly in the background so please **USE THIS MODE!** It doesn't mean Locus is connected to GPS all the time though - only when it needs it so don't worry about the battery consumption. ==== Android 11 and newer ==== This OS version goes even further. The "all the time" permission is **not included in the system app permissions**. You can select only "while using this app" or "ask every time":\\ {{ :manual:faq:loc_permission01.png?nolink |}}\\ When you **launch Locus Map** and start some feature that runs in the background (voice navigation, track recording, live tracking...), Locus displays a compulsory warning:\\ {{ :manual:faq:loc_permission02.png?nolink |}}. Then you are prompted to **allow all-time access to the location** in the system settings:\\ {{ :manual:faq:loc_permission03.png?nolink |}}\\ {{ :manual:faq:loc_permission04.png?nolink |}} This setting, however, is not permanent. **After not using the app for some time (e.g. three months), the "all-time" access permission is taken away** and you have to go through this procedure again. ===== Exclude Locus from battery optimization ===== **Battery saving modes** or other **performance-optimizing settings** in your device kill apps they consider unused or redundant, no matter the app is running in the background on the user's request. The mode can be named differently depending on the device manufacturer. There are two ways how to prevent this - either **switch the saving mode completely OFF** or **make an exclusion for Locus** if it is possible. Here are a few device specific instructions: ==== HTC ==== //Standard/Extreme Power Saving Mode// - switch it OFF **See also https://dontkillmyapp.com/htc >>** ==== Samsung ==== * **Android 6+** - settings > battery > //Power saving mode OFF// + battery use > "next" (three dots) button in topbar > battery use optimization > click on "Apps are not optimized" and select "All apps" and here finally find Locus Map and switch the optimization OFF for it. * **Android 7** - Apps > ...(menu) Special Access > Optimize battery usage -> (drop down) All apps -> look for Locus and switch off switcher near it. * **Android 9** - Settings > Apps > 3-dot button top right > Special access > Optimise battery usage > down arrow > select all > scroll down and turn off the switch at Locus Map **See also https://dontkillmyapp.com/samsung >>** ==== Huawei/Honor ==== There are several tips. Check out which one fits for your device: * Settings > Apps > Advanced > Ignore optimizations > All apps > disable optimizations for Locus Map * Settings > Apps > Settings button > Special access > Ignore optimizations > Locus Map > Allow * Settings > Battery > 'disable' Power saving mode, 'disable' Ultra power saving * Settings > Battery > Settings button > 'disable' close excessively power-intensive apps * Settings > Battery > Close apps after screen lock > 'disable' for Locus Map and all related add-ons, like e.g. [[manual:user_guide:geocaching:import|Geocaching4Locus]] Tips also on [[https://support.strava.com/hc/en-us/articles/216942547-How-to-fix-GPS-recording-issues-on-Huawei-phones|Strava support site >>]] === Huawei/Honor Android 8+ === * phone settings > apps > Settings button > Special access > Ignore optimizations > Locus Map > Allow * phone settings > battery > 'disable' Power saving mode, 'disable' Ultra power saving * phone settings > battery > App launch > 'disable' automatic and keep all three 'manual' settings enabled In Locus Map, better results are with disabled Settings > GPS > Google Services assisted location. **See also https://dontkillmyapp.com/huawei >>** ==== Sony ==== Do not use //STAMINA mode//. **See also https://dontkillmyapp.com/sony >>** ==== Nexus ==== Switch //Battery saver, battery optimization// off or exclude Locus from its activity. **See also https://dontkillmyapp.com/google >>** ==== Xiaomi ==== * **Android older than 6.0** - turn //Standard/Advanced Power Saving Mode// OFF * **Android 6+ (MIUI 8+)** * Security > Battery > Battery saver > OFF or Settings > Battery & performance > Manage apps battery usage > Power saving modes > OFF * Security > Battery > App Battery Saver > select Locus Map > No restrictions * Security > Manage apps > Permissions > Autostart > Locus Map ON * Security > Battery > Settings icon (top right corner of the screen) > Clear cache when device is locked > Never * lock Locus Map in RAM when you want to use it in background: start Locus Map > minimize it > open RAM manager > drag Locus icon downwards and tap the lock icon * //Optional if nothing above helps//: Settings > Additional settings > Developer options (this option is activated after several taps on phone info > MIUI version) > turn OFF RAM optimization * **MIUI 12+** * settings > Manage apps > Locus Map: * **Autostart ON** * App permissions > **Location ON** * Battery saver > **NO RESTRICTIONS** * lock Locus Map in RAM - start Locus Map > minimize it > open RAM manager > long tap Locus box > **tap the lock icon** * we strongly recommend allowing all available system permissions to Locus for a smooth run **See also https://dontkillmyapp.com/xiaomi >>** Some devices (e.g. Motorola) enable **excluding location service** from battery optimization. For more information about battery optimization of other mobile phone vendors, please see **https://dontkillmyapp.com/**. ===== Battery optimization apps ===== There are also third-party apps that can maintain your battery optimization and may kill Locus or GPS unit. ==== Greenify ==== Greenify has some special settings (labeled experimental), that enhance new Android 6 power-saving strategies. These power-saving strategies are labeled "shallow hibernation" and "aggressive doze". The "aggressive doze" mode contains also a white list of apps that are excluded from the mode and Locus is likely to be put here for the above-mentioned reasons. Unfortunately, this whitelisting does not work. After 5 minutes after your device enters doze mode Locus track recording is killed. Therefore, we recommend not to use this aggressive mode or the app as a whole. ===== Universal solution? ===== ==== Memory Locker ==== Recently we discovered an application that can lock Locus (and other apps of your choice) in your device's RAM. It's called **Memory Locker** and is available at **[[https://play.google.com/store/apps/details?id=com.smartprojects.MemoryLocker|Google Play Store]]**. We have tested only a few devices with this app and it looks promising. However, as this is a third-party app, we have no responsibility for nor influence on the app performance. ==== GPS Locker ==== This app is able to lock the system's GPS ON so that the operating system can not kill it - we recommend in cases Locus loses GPS signal in standby mode and none of the previously mentioned methods helped. The app is available at **[[https://play.google.com/store/apps/details?id=com.silentlexx.gpslock|Google Play Store >>]]**