java.lang.Object | |
↳ | android.location.LocationProvider |
An abstract superclass for location providers. A location provider provides periodic reports on the geographical location of the device.
Each provider has a set of criteria under which it may be used;
for example, some providers require GPS hardware and visibility to
a number of satellites; others require the use of the cellular
radio, or access to a specific carrier's network, or to the
internet. They may also have different battery consumption
characteristics or monetary costs to the user. The Criteria
class allows providers to be selected based on
user-specified criteria.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | AVAILABLE | ||||||||||
int | OUT_OF_SERVICE | ||||||||||
int | TEMPORARILY_UNAVAILABLE |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns a constant describing horizontal accuracy of this provider.
| |||||||||||
Returns the name of this provider.
| |||||||||||
Returns the power requirement for this provider.
| |||||||||||
Returns true if the use of this provider may result in a
monetary charge to the user, false if use is free.
| |||||||||||
Returns true if this provider meets the given criteria,
false otherwise.
| |||||||||||
Returns true if the provider requires access to an appropriate
cellular network (e.g., to make use of cell tower IDs), false
otherwise.
| |||||||||||
Returns true if the provider requires access to a
data network (e.g., the Internet), false otherwise.
| |||||||||||
Returns true if the provider requires access to a
satellite-based positioning system (e.g., GPS), false
otherwise.
| |||||||||||
Returns true if the provider is able to provide altitude
information, false otherwise.
| |||||||||||
Returns true if the provider is able to provide bearing
information, false otherwise.
| |||||||||||
Returns true if the provider is able to provide speed
information, false otherwise.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Returns a constant describing horizontal accuracy of this provider.
If the provider returns finer grain or exact location,
ACCURACY_FINE
is returned, otherwise if the
location is only approximate then ACCURACY_COARSE
is returned.
Returns the power requirement for this provider.
Returns true if the use of this provider may result in a monetary charge to the user, false if use is free. It is up to each provider to give accurate information.
Returns true if this provider meets the given criteria, false otherwise.
Returns true if the provider requires access to an appropriate cellular network (e.g., to make use of cell tower IDs), false otherwise.
Returns true if the provider requires access to a data network (e.g., the Internet), false otherwise.
Returns true if the provider requires access to a satellite-based positioning system (e.g., GPS), false otherwise.
Returns true if the provider is able to provide altitude information, false otherwise. A provider that reports altitude under most circumstances but may occassionally not report it should return true.
Returns true if the provider is able to provide bearing information, false otherwise. A provider that reports bearing under most circumstances but may occassionally not report it should return true.
Returns true if the provider is able to provide speed information, false otherwise. A provider that reports speed under most circumstances but may occassionally not report it should return true.