目录

public abstract interface LocationSource

Defines a location source that provides location data.

Public Fields

None.

Constructor

None.

Public Method Summary

Return typeMethod name
abstract voidactivate(LocationSource.OnLocationChangedListener listener)
abstract voiddeactivate()

Nested Class Summary

ClassFunction
LocationSource.OnLocationChangedListenerListens for location updates.

Public Methods

Method
public abstract void activate(LocationSource.OnLocationChangedListener listener)
Activates a location source and listens for location updates.


Parameters:

Parameter nameParameter desc
listenerListener used to listen for location updates.


Return:
None.
Exception:

Exception typeScenario
IllegalStateExceptionThe provided location source has been activated.
IllegalArgumentExceptionThe listener parameter is set to null.
Method
public abstract deactivate()
Deactivates a location source.


Parameters:
None.
Return:
None.
Exception:

Exception typeScenario
IllegalStateExceptionThe location source has not been activated.