-
-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Problem:
In the new versions of Android, it is impossible to use mock location while the location service is not enabled (the fused location provider is available). Therefore, applications like com.yandex.maps and com.yandex.navigator (possibly others as well) display a mock location from Bluetooth GNSS for a while, then switch to network location because the fused location provider is active and can process application requests. It is impossible to revoke COARSE_LOCATION from the application via appops, leaving only FINE_LOCATION.
Possible reasons:
- Lack of accuracy (Bluetooth GNSS sets the accuracy for mock location much higher than PDOP).
- Absence of some typical GPS parameters (speed, course, possibly something else) in the mock location, which causes the navigation application to "suspect" that it is a mock and switch to a more trusted provider.
Solutions:
- Create a test build that transmits a floating accuracy within 1-2 meters to check the reaction of navigation applications. It is possible to mathematically adjust the accuracy currently provided by Bluetooth GNSS to a range of 1..2m or 2..3m, but not more. Higher values are considered unreliable in navigation programs.
- Along with mock GPS, transmit mock network. Create an additional setting for this.
All this functionality is available in the Bluetooth GPS Provider app (de.mobilej.btgps), with the options "Use GPS position for Network Provider" and "RAW HDOP." However, it is very old and does not work on Android 15. //https://l-36.com/bluetooth_gps_provider.php
I have an external receiver, but I can't actually use it in Yandex applications. I tried using all available applications Bluetooth receiver -> mock location, but the behavior is the same everywhere; after some time, Yandex switches to network location. Making a build with fixed accuracy is a matter of 10 minutes. Please help me.