public class LocationServices
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
void |
addLocationListener(LocationListener locationListener)
Registers a LocationListener to receive location updates
|
android.location.Location |
getLastLocation()
Last known location
|
static LocationServices |
getLocationServices(android.content.Context context)
Primary (singleton) access method for LocationServices
|
boolean |
isGPSEnabled()
Returns if the GPS sensor is currently enabled
|
void |
onLocationChanged(android.location.Location location)
Called when the location has changed.
|
boolean |
removeLocationListener(LocationListener locationListener)
Unregister a LocationListener to stop receiving location updates
|
void |
toggleGPS(boolean enableGPS)
Enabled / Disable GPS focused location tracking
|
public static LocationServices getLocationServices(android.content.Context context)
context - Contextpublic void toggleGPS(boolean enableGPS)
enableGPS - true if GPS is to be enabled, false if GPS is to be disabledpublic boolean isGPSEnabled()
public void onLocationChanged(android.location.Location location)
location - The updated locationpublic android.location.Location getLastLocation()
public void addLocationListener(LocationListener locationListener)
locationListener - LocationListenerpublic boolean removeLocationListener(LocationListener locationListener)
locationListener - LocationListener to remove