|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A LocationProvider represents a location-providing module, generating Locations. Applications obtain LocationProvider instances by calling the factory method in the LocationManager. It is the responsibility of the implementation to return the correct LocationProvider-derived object. Applications that need to specify criteria for the location provider selection, must first create a Criteria object, and pass it to the factory method. The methods that access the location related information shall throw SecurityException if the application does not have the relevant permission to access the location information.
Field Summary | |
static int |
AVAILABLE
Availability status code: the location provider is available. |
static int |
PERMANENTLY_UNAVAILABLE
Availability status code: the location provider is permanently unavailable. |
static int |
TEMPORARILY_UNAVAILABLE
Availability status code: the location provider is temporarily unavailable. |
Method Summary | |
void |
addLocationListener(LocationListener listener,
int interval)
Adds a LocationListener for updates at the defined interval. |
Location |
getLatestKnownLocation()
Returns the latest known location that the implementation has. |
Location |
getLocation(int timeout)
Retrieves a Location with the constraints given by the Criteria associated with this class. |
int |
getState()
Returns the current state of this LocationProvider. |
void |
removeLocationListener(LocationListener listener)
Removes a LocationListener |
void |
reset()
Resets the LocationProvider. |
Field Detail |
public static final int AVAILABLE
public static final int PERMANENTLY_UNAVAILABLE
public static final int TEMPORARILY_UNAVAILABLE
Method Detail |
public Location getLatestKnownLocation()
public Location getLocation(int timeout)
timeout
- Description of the Parameter
public int getState()
public void reset()
public void addLocationListener(LocationListener listener, int interval)
listener
- The new locationListener valueinterval
- The new interval valuepublic void removeLocationListener(LocationListener listener)
listener
- the listener to remove
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |