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 http://www.cyanogenmod.com/, 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:

https://groups.google.com/forum/?fromgroups=#!topic/android-developers/OvCcdvO6jZY

and:

http://stackoverflow.com/questions/3505968/how-do-i-add-install-my-own-locationprovider

http://stackoverflow.com/questions/3476600/why-are-these-permissions-being-refused*