microg / UnifiedNlp

Alternative network location provider for Android, with plugin interface to easily integrate third-party location providers.
968 stars 209 forks source link

Setting default backends when integrating with the system #190

Closed chirayudesai closed 4 years ago

chirayudesai commented 4 years ago

Hi,

I work on CalyxOS, and we ship microG by default.

We set default_location_backends and default_geocoder_backends to set the default backends, but I see that those have been removed in the latest version - https://github.com/microg/UnifiedNlp/commit/d0d3f500808981ce7ae451858f7a92012309b949#diff-6c6f7bef57a5890057a49ed6c6191676

Is there any plan to bring it back, or if not, is there any alternate method by which we can set this?

For reference, this is how we're setting it right now:

mar-v-in commented 4 years ago

There will be an alternative mechanism to allow the system to set default configuration, probably by placing a file in /system/etc or similar. This will be added and documented before the first stable of 2.0.

chirayudesai commented 4 years ago

Thanks for the quick reply. Happy to help test that mechanism.

Another concern we had with the update is losing the backends selected, i.e. "It may be required to re-enable UnifiedNlp location modules" from the notes.

This mechanism would handle most users who just have the default set, but anybody who has select any additional backends would still have to reconfigured, and it would be nicer if that weren't the case.

chirayudesai commented 4 years ago

I noticed that you made a commit adding support for /system/etc/microg.xml a while ago, thanks!

We're shipping it now, https://gitlab.com/calyxos/platform_prebuilts_calyx/-/blob/2020.09.22.12/microg/microg.xml

For reference, this is basically the preferences file from /data on device. We ship the APKs as-is / unmodified / same signature from F-Droid, so that's what the signatures are.

One can verify using apksigner verify --print-certs file.apk

marosseleng commented 3 years ago

Hi, I would like to know whether there has been any update on the docs regarding setting the default backend when UnifiedNlp is part of ROM. Thanks!