de.enough.polish.location
Class LocationService

java.lang.Object
  extended by de.enough.polish.location.LocationService

public class LocationService
extends Object


Field Summary
static javax.microedition.location.Criteria CRITERIA_GPS_PROVIDER
           
static javax.microedition.location.Criteria CRITERIA_NETWORK_PROVIDER
           
 
Constructor Summary
LocationService()
           
 
Method Summary
static FallbackLocationProvider getFallbackLocationProvider(javax.microedition.location.Criteria[] criteria)
          Returns a FallbackLocationProvider object.
static boolean isGpsEnabled()
          Informs the caller about the status of the GPS device.
static boolean isNetworkLocationProviderEnabled()
          Informs the caller about the status of the Network location provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CRITERIA_GPS_PROVIDER

public static final javax.microedition.location.Criteria CRITERIA_GPS_PROVIDER

CRITERIA_NETWORK_PROVIDER

public static final javax.microedition.location.Criteria CRITERIA_NETWORK_PROVIDER
Constructor Detail

LocationService

public LocationService()
Method Detail

getFallbackLocationProvider

public static FallbackLocationProvider getFallbackLocationProvider(javax.microedition.location.Criteria[] criteria)
                                                            throws javax.microedition.location.LocationException
Returns a FallbackLocationProvider object.

Parameters:
criteria - The value is a array containing all Criteria objects which should be used in the given order. If the location provider fitting the first criteria is not available anymore, the next criteria is used to find an available location provider.
Returns:
a FallbackLocationProvider object which will use location providers in the order of the given criteria.
Throws:
javax.microedition.location.LocationException - when all location providers are unavailable

isGpsEnabled

public static boolean isGpsEnabled()
Informs the caller about the status of the GPS device.

Returns:
The value is 'true' if the GPS device is enabled on the device and can be used. This does not say anything about the capability of the GPS device to actually get a fix. The value 'false' is returned if the GPS device is disabled.

isNetworkLocationProviderEnabled

public static boolean isNetworkLocationProviderEnabled()
Informs the caller about the status of the Network location provider.

Returns:
The value is 'true' if the Network location provider is enabled on the device and can be used. This does not say anything about the capability of the Network location provider to actually get a fix. The value 'false' is returned if the Network location provider is disabled.