Methods Summary |
---|
public static void | addProximityListener(ProximityListener listener, Coordinates coordinates, float proximityRadius)
String proximitySupported =
Configuration.getProperty(PROXIMITY_SUPPORTED);
if (proximitySupported.equals("true")) {
Util.checkForPermission(Permissions.LOCATION_PROXIMITY, false);
if (listener == null || coordinates == null) {
throw new NullPointerException();
}
if (proximityRadius <= 0.0F || Float.isNaN(proximityRadius)) {
throw new IllegalArgumentException(
"Illegal proximityRadius: " + proximityRadius);
}
ProximityNotifier.getInstance().addProximityListener(listener,
coordinates, proximityRadius);
} else {
throw new LocationException(
"Proximity monitoring is not supported");
}
|
public static javax.microedition.location.LocationProvider | getInstance(Criteria criteria)
return LocationProviderImpl.getInstanceImpl(criteria);
|
public static Location | getLastKnownLocation()
Util.checkForPermission(Permissions.LOCATION, false);
return LocationProviderImpl.getLastKnownLocation();
|
public abstract Location | getLocation(int timeout)
|
public abstract int | getState()
|
public static void | removeProximityListener(ProximityListener listener)
if (listener == null) {
throw new NullPointerException("Proximity listener is null");
}
ProximityNotifier.getInstance().removeProximityListener(listener);
|
public abstract void | reset()
|
public abstract void | setLocationListener(LocationListener listener, int interval, int timeout, int maxAge)
|