Poor track recording with external Mock Locations

Johannes Müller shared this question 24 days ago

Locus Maps is recording tracks reliably with my external GPS receiver "Qstarz 818XT" if I connect the receiver using the settings of Locus Maps itself (menu > Settings > GPS & sensors > Bluetooth GPS), even if the smartphone is locked and the display is turned off.

But, if want to use the external GPS receiver not only for Locus Maps, but also for other apps like Google Maps and others, using the "Mock Locations" feature in Android's developer options, together with an app like "Bluetooth GPS Provider" ( https://play.google.com/store/apps/details?id=de.mobilej.btgps ), then Locus Maps' track recording becomes unreliable if the screen is locked.

On the attached screenshot you can see a straight section caused by missing track points of a recorded track with Mock Locations while the screen was turned off.

Please fix.

Comments (5)


Hi Johannes,

as you write, "Locus Maps is recording tracks reliably with my external GPS receiver "Qstarz 818XT" if I connect the receiver using the settings of Locus Maps itself (menu > Settings > GPS & sensors > Bluetooth GPS), even if the smartphone is locked and the display is turned off.". This is what Locus Map is expected and designed to do. Your second statement that Locus Map doesn't behave correctly if you tweak its BT receiving with some third party app and special developer-mode is, I'm afraid, not relevant - there is nothing to be fixed in Locus Map.


Michael, do you know the "Mock location" feature in the dev settings of every Android smartphone?

This feature can be used to provide high-quality GPS coordinates retrieved by a dedicated, external Bluetooth GPS receiver to the whole(!) Android system.

This is reasonable for many users because the hardware GPS receivers built-in to almost every smartphone out there have to meet several trade-offs in regards to price, power consumption and physical space and therefore often deliver data of lousy quality in difficult situations, like in citites with narrow streets and high buildings etc.

This is the reason why Locus Maps itself supports external Bluetooth GPS receivers directly. That is fine. But it's not perfect.

The problem is, that Locus Maps is not the only app that is supposed to use the high-quality data of an external Bluetooth GPS receiver.

I am using other apps in parallel to Locus Maps, like Google Maps and others!

Locus Maps is not fully compatible with the "Mock location" feature of Android. It works fine as long as Locus Maps is in foreground and the device is on, but it breaks as soon as the smartphone is put to standby mode, see the screenshot in my initial posting.

This should be fixed or, to regard it from a less bug-oriented point of view, improved.

This is not about a third-party app.


Good day Johannes,

I'll try to help here as the main app developer. From a technical point of view, the application that use GPS received over "mock location" system, is completely unable to detect if the source is directly from GPS hardware unit or from this "mock provider". Also, Locus does not care about this. It works in the exact same way, no matter from where GPS location comes.

So the result is, if there is any new problem in Locus Map with GPS over this mock provider, that does not happen when you use device internal GPS, then I guarantee, it is not a problem of Locus Map, but more a problem of mock provider application. Most probably it is affected by battery optimizations as well as may be Locus Map app.


Hi Menion, thanks for having a look at this.

There is one mistake I made myself before running into this issue, which was not disabling the "Battery optimization" feature on my OnePlus 6 for both apps, Locus Maps Pro AND "Bluetooth GPS Provider" ( https://play.google.com/store/apps/details?id=de.mobilej.btgps ).

After disabling this feature for both apps, the recording of GPS data via "Mock Locations" was reliable... until one point after about 20 minutes where it suddenly ended for no obvious reason. I did not touch anything! The Bluetooth connection between the QStarz 818XT and my OnePlus 6 was established all the time. This can be double-checked by a blue LED of the QStarz 818XT that blinks as long as the BT connection is fine.

Please have a look at the following tracks that I uploaded to GPSies.com and compare them:

1.) "20190205 Locus Pro Mock Locations Stopped Recording" :


2.) "20190205 Garmin Forerunner 235 Complete Recording":


Both tracks were recorded during the same bicycle tour about two hours ago.

Track 1.) was made with following setup:

- OnePlus 6 ("ONEPLUS A6003", 8 GB, 256 GB, Android 9, OxygenOS 9.0.3) in the rear pocket of my bicycle shirt, in standby mode, i.e. display off.

- Locus Maps Pro 3.36.2

- QStarz 818XT mounted on the top of the handle bar, with a clear view to the sky

- Bluetooth GPS Provider 1.7.3

- "Mock Locations" enabled

- "Battery optimization" disabled both for Locus Maps and for Bluetooth GPS provider

Track 2.) was made with a GPS sport watch at my wrist (Garmin Forerunner 235). I forgot to push the start button at the beginning, that's the reason why the first part is missing, but after that, everything was recorded smoothly and reliably.

I would like to get the setup with "QStarz 818XT" and Locus Maps as reliable as the Forerunner 235, using Mock Locations.

By the way: Yesterday I learned that the Mock Locations interface does not provide sattelite data, but only position data. This is the reason why there are no satellites visible in "Mock Locations" mode.


Hi Johannes, please check twice that ALL optimizations in your phone are disabled for both apps: https://dontkillmyapp.com/oneplus