Custom Location Provider in Android cannot be installed

I just checked if it is possible to develop a custom-made location provider for Android (for example, a wi-fi-fingerprint-based one, implememented as a system service that can be used by any application).

It isn’t.

While it is certainly possible to subclass LocationProvider and develop a custom-made location provider, the resulting class cannot be installed on the device because of security constrains.

In particular, the resulting new class would need android.permission.INSTALL_LOCATION_PROVIDER permission. This permission is reserved to OEMs. Third-party developer cannot grant it to their applications.

Of course, third-party firmware developer, like, could insert such a new provider class into their firmware package, sign it with their key and install it on the user’s devices.

For details, see:!topic/android-developers/OvCcdvO6jZY