Discussion:
Location Providers
Bradley Kite
2008-10-18 20:49:30 UTC
Permalink
Hi all,

The LocationProvider class (android.location.LocationProvider) is
documented as being an abstract super-class, However I could not find
any concrete classes (eg GPSLocationProvider, CellLocationProvider,
WifiLocationProvider etc.).

Does any body (either from within google, or otherwise) know which
location providers are actually implemented?

How would one go about implementing other LocationProviders?

Many thanks in advance.
--
Brad.
Dianne Hackborn
2008-10-19 08:08:35 UTC
Permalink
They are implemented in the platform code, which hasn't yet been released.
I believe subclassing by apps is only for development on the emulator to
generate fake location information.
Post by Bradley Kite
Hi all,
The LocationProvider class (android.location.LocationProvider) is
documented as being an abstract super-class, However I could not find
any concrete classes (eg GPSLocationProvider, CellLocationProvider,
WifiLocationProvider etc.).
Does any body (either from within google, or otherwise) know which
location providers are actually implemented?
How would one go about implementing other LocationProviders?
Many thanks in advance.
--
Brad.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers-***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---
Bradley Kite
2008-10-27 22:19:03 UTC
Permalink
Thanks for this info Dianne,

Going through the source I have managed to figure out that additional
location providers can be loaded by putting the class-name into a file
on the system called /data/location/[myProvider]/class

The LocationManagerService will then instantiate this class, and add
it to the list of location providers where they can be used like the
GPS and Location providers.

The bit of the puzzle I appear to be missing, however, is how I can
create the file /data/location/[myProvider]/class when my .apk is
installed. I could try create the file the first time my application
is started, however by the looks of it the permissions on the
directory will not allow my application to create such a
file/directory.

Are there easier ways in which people can integrate custom location
providers with the base Android platform?

Kind Regards
--
Brad.
Post by Dianne Hackborn
They are implemented in the platform code, which hasn't yet been released.
I believe subclassing by apps is only for development on the emulator to
generate fake location information.
Post by Bradley Kite
Hi all,
The LocationProvider class
(android.location.LocationProvider) is
Post by Bradley Kite
documented as being an abstract super-class, However I could not find
any concrete classes (eg GPSLocationProvider, CellLocationProvider,
WifiLocationProvider etc.).
Does any body (either from within google, or otherwise) know which
location providers are actually implemented?
How would one go about implementing other LocationProviders?
Many thanks in advance.
--
Brad.
Continue reading on narkive:
Loading...