How to provide your own LocationProvider on Android? -
How does anyone provide to their place provider and publish it on the system, so other apps have a reference about it Can the location manager get?
You can apply for duplicate location providers for development and testing purposes. The application needs to enable "Allow mock locations" in the developer options to see
For a code example, see the GPX playback:
Code file android / src / com / Twolinessoftware / android / playbackservice.java
for registration of the location provider.
If you want a "real" location provider (such as to implement your functionality as part of an end-user application), some sources say that it can not be done when As long as the provider is not in a package signed with the system key, you will have to create your own rom from the source, sign it with your key, from the same location on your location provider When Sr and install both on your phone.
However, at some points the Android introduced "Unbundle" to the location provider. Obviously he was required to move his volunteer network sponsor from the Android Core in the Google Apps package.
I have not worked in any unbundled location provider yet and I am using any open-source code, but it seems that the latest version of Android for "aftermarket" location provider stands by.
The source code for the related library
A location provider must expand com.android.location.provider.LocationProviderBase
.
Classes and methods are documented in the code.
Edit: Viewing
Starting from the 607 line, it seems that the security level signature and system
INSTALL_LOCATION_PROVIDER
/ Code>. This means that any app using this feature (i.e. the location provider installs it is not necessary that it is a lockian provider) either needs to sign with the same key as the platform (which will give you the source Requires your entire Android system) or installed as a system application (which can work on rooted devices).
There is some code in it
I have not seen it in detail (yet) or created a LocationProvider, so I can not say that It works and what is needed for it. But maybe it provides some hints.
Comments
Post a Comment