public abstract interface LocationSource
Defines a location source that provides location data.
None.
None.
| Return type | Method name |
| abstract void | activate(LocationSource.OnLocationChangedListener listener) |
| abstract void | deactivate() |
| Class | Function |
| LocationSource.OnLocationChangedListener | Listens for location updates. |
| Method |
| public abstract void activate(LocationSource.OnLocationChangedListener listener) |
| Activates a location source and listens for location updates. |
Parameters:
| Parameter name | Parameter desc |
| listener | Listener used to listen for location updates. |
Return:
None.
Exception:
| Exception type | Scenario |
| IllegalStateException | The provided location source has been activated. |
| IllegalArgumentException | The listener parameter is set to null. |
| Method |
| public abstract deactivate() |
| Deactivates a location source. |
Parameters:
None.
Return:
None.
Exception:
| Exception type | Scenario |
| IllegalStateException | The location source has not been activated. |