# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Methods | Inherited Methods

# LocationProvider

`public class LocationProvider`
`extends Object` ``

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.

## Summary

### Constants
`int` | `AVAILABLE` This constant is deprecated. Location provider statuses are no longer supported.
`int` | `OUT_OF_SERVICE` This constant is deprecated. Location provider statuses are no longer supported.
`int` | `TEMPORARILY_UNAVAILABLE` This constant is deprecated. Location provider statuses are no longer supported.

### Public methods
`int` | `getAccuracy()` Returns a constant describing horizontal accuracy of this provider.
`String` | `getName()` Returns the name of this provider.
`int` | `getPowerRequirement()` Returns the power requirement for this provider.
`boolean` | `hasMonetaryCost()` Returns true if the use of this provider may result in a monetary charge to the user, false if use is free.
`boolean` | `meetsCriteria(Criteria criteria)` Returns true if this provider meets the given criteria, false otherwise.
`boolean` | `requiresCell()` Returns true if the provider requires access to an appropriate cellular network (e.g., to make use of cell tower IDs), false otherwise.
`boolean` | `requiresNetwork()` Returns true if the provider requires access to a data network (e.g., the Internet), false otherwise.
`boolean` | `requiresSatellite()` Returns true if the provider requires access to a satellite-based positioning system (e.g., GPS), false otherwise.
`boolean` | `supportsAltitude()` Returns true if the provider is able to provide altitude information, false otherwise.
`boolean` | `supportsBearing()` Returns true if the provider is able to provide bearing information, false otherwise.
`boolean` | `supportsSpeed()` Returns true if the provider is able to provide speed information, false otherwise.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Constants

### AVAILABLE

    public static final int AVAILABLE

This constant is deprecated.
Location provider statuses are no longer supported.

Constant Value: 2 (0x00000002)

### OUT_OF_SERVICE

    public static final int OUT_OF_SERVICE

This constant is deprecated.
Location provider statuses are no longer supported.

Constant Value: 0 (0x00000000)

### TEMPORARILY_UNAVAILABLE

    public static final int TEMPORARILY_UNAVAILABLE

This constant is deprecated.
Location provider statuses are no longer supported.

Constant Value: 1 (0x00000001)

## Public methods

### getAccuracy

    public int getAccuracy ()

Returns a constant describing horizontal accuracy of this provider. If the provider returns finer grain or exact location, `Criteria#ACCURACY_FINE` is returned, otherwise if the location is only approximate then `Criteria#ACCURACY_COARSE` is returned.

Returns
`int` |

### getName

    public String getName ()

Returns the name of this provider.

Returns
`String` |

### getPowerRequirement

    public int getPowerRequirement ()

Returns the power requirement for this provider.

Returns
`int` | the power requirement for this provider, as one of the constants Criteria.POWER_REQUIREMENT_*.

### hasMonetaryCost

    public boolean hasMonetaryCost ()

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
`boolean` |

### meetsCriteria

    public boolean meetsCriteria (Criteria criteria)

Returns true if this provider meets the given criteria, false otherwise.

Parameters
`criteria` | `Criteria`

Returns
`boolean` |

### requiresCell

    public boolean requiresCell ()

Returns true if the provider requires access to an appropriate cellular network (e.g., to make use of cell tower IDs), false otherwise.

Returns
`boolean` |

### requiresNetwork

    public boolean requiresNetwork ()

Returns true if the provider requires access to a data network (e.g., the Internet), false otherwise.

Returns
`boolean` |

### requiresSatellite

    public boolean requiresSatellite ()

Returns true if the provider requires access to a satellite-based positioning system (e.g., GPS), false otherwise.

Returns
`boolean` |

### supportsAltitude

    public boolean supportsAltitude ()

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
`boolean` |

### supportsBearing

    public boolean supportsBearing ()

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
`boolean` |

### supportsSpeed

    public boolean supportsSpeed ()

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.

Returns
`boolean` |

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*