android.location
Class LocationManager

java.lang.Object
  extended by android.location.LocationManager

public class LocationManager
extends Object


Field Summary
static String GPS_PROVIDER
           
static String KEY_LOCATION_CHANGED
           
static String KEY_PROVIDER_ENABLED
           
static String KEY_PROXIMITY_ENTERING
           
static String KEY_STATUS_CHANGED
           
static String NETWORK_PROVIDER
           
static String PASSIVE_PROVIDER
           
static String PROVIDERS_CHANGED_ACTION
           
 
Method Summary
 boolean addGpsStatusListener(GpsStatus.Listener listener)
           
 boolean addNmeaListener(GpsStatus.NmeaListener listener)
           
 void addProximityAlert(double latitude, double longitude, float radius, long expiration, PendingIntent intent)
           
 void addTestProvider(String name, boolean requiresNetwork, boolean requiresSatellite, boolean requiresCell, boolean hasMonetaryCost, boolean supportsAltitude, boolean supportsSpeed, boolean supportsBearing, int powerRequirement, int accuracy)
           
 void clearTestProviderEnabled(String provider)
           
 void clearTestProviderLocation(String provider)
           
 void clearTestProviderStatus(String provider)
           
 List<String> getAllProviders()
           
 String getBestProvider(Criteria criteria, boolean enabledOnly)
           
 GpsStatus getGpsStatus(GpsStatus status)
           
 Location getLastKnownLocation(String provider)
           
 LocationProvider getProvider(String name)
           
 List<String> getProviders(boolean enabledOnly)
           
 List<String> getProviders(Criteria criteria, boolean enabledOnly)
           
 boolean isProviderEnabled(String provider)
           
 void removeGpsStatusListener(GpsStatus.Listener listener)
           
 void removeNmeaListener(GpsStatus.NmeaListener listener)
           
 void removeProximityAlert(PendingIntent intent)
           
 void removeTestProvider(String provider)
           
 void removeUpdates(LocationListener listener)
           
 void removeUpdates(PendingIntent intent)
           
 void requestLocationUpdates(long minTime, float minDistance, Criteria criteria, LocationListener listener, Looper looper)
           
 void requestLocationUpdates(long minTime, float minDistance, Criteria criteria, PendingIntent intent)
           
 void requestLocationUpdates(String provider, long minTime, float minDistance, LocationListener listener)
           
 void requestLocationUpdates(String provider, long minTime, float minDistance, LocationListener listener, Looper looper)
           
 void requestLocationUpdates(String provider, long minTime, float minDistance, PendingIntent intent)
           
 void requestSingleUpdate(Criteria criteria, LocationListener listener, Looper looper)
           
 void requestSingleUpdate(Criteria criteria, PendingIntent intent)
           
 void requestSingleUpdate(String provider, LocationListener listener, Looper looper)
           
 void requestSingleUpdate(String provider, PendingIntent intent)
           
 boolean sendExtraCommand(String provider, String command, Bundle extras)
           
 void setTestProviderEnabled(String provider, boolean enabled)
           
 void setTestProviderLocation(String provider, Location loc)
           
 void setTestProviderStatus(String provider, int status, Bundle extras, long updateTime)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NETWORK_PROVIDER

public static final String NETWORK_PROVIDER
See Also:
Constant Field Values

GPS_PROVIDER

public static final String GPS_PROVIDER
See Also:
Constant Field Values

PASSIVE_PROVIDER

public static final String PASSIVE_PROVIDER
See Also:
Constant Field Values

KEY_PROXIMITY_ENTERING

public static final String KEY_PROXIMITY_ENTERING
See Also:
Constant Field Values

KEY_STATUS_CHANGED

public static final String KEY_STATUS_CHANGED
See Also:
Constant Field Values

KEY_PROVIDER_ENABLED

public static final String KEY_PROVIDER_ENABLED
See Also:
Constant Field Values

KEY_LOCATION_CHANGED

public static final String KEY_LOCATION_CHANGED
See Also:
Constant Field Values

PROVIDERS_CHANGED_ACTION

public static final String PROVIDERS_CHANGED_ACTION
See Also:
Constant Field Values
Method Detail

getAllProviders

public List<String> getAllProviders()

getProviders

public List<String> getProviders(boolean enabledOnly)

getProvider

public LocationProvider getProvider(String name)

getProviders

public List<String> getProviders(Criteria criteria,
                                 boolean enabledOnly)

getBestProvider

public String getBestProvider(Criteria criteria,
                              boolean enabledOnly)

requestLocationUpdates

public void requestLocationUpdates(String provider,
                                   long minTime,
                                   float minDistance,
                                   LocationListener listener)

requestLocationUpdates

public void requestLocationUpdates(String provider,
                                   long minTime,
                                   float minDistance,
                                   LocationListener listener,
                                   Looper looper)

requestLocationUpdates

public void requestLocationUpdates(long minTime,
                                   float minDistance,
                                   Criteria criteria,
                                   LocationListener listener,
                                   Looper looper)

requestLocationUpdates

public void requestLocationUpdates(String provider,
                                   long minTime,
                                   float minDistance,
                                   PendingIntent intent)

requestLocationUpdates

public void requestLocationUpdates(long minTime,
                                   float minDistance,
                                   Criteria criteria,
                                   PendingIntent intent)

requestSingleUpdate

public void requestSingleUpdate(String provider,
                                LocationListener listener,
                                Looper looper)

requestSingleUpdate

public void requestSingleUpdate(Criteria criteria,
                                LocationListener listener,
                                Looper looper)

requestSingleUpdate

public void requestSingleUpdate(String provider,
                                PendingIntent intent)

requestSingleUpdate

public void requestSingleUpdate(Criteria criteria,
                                PendingIntent intent)

removeUpdates

public void removeUpdates(LocationListener listener)

removeUpdates

public void removeUpdates(PendingIntent intent)

addProximityAlert

public void addProximityAlert(double latitude,
                              double longitude,
                              float radius,
                              long expiration,
                              PendingIntent intent)

removeProximityAlert

public void removeProximityAlert(PendingIntent intent)

isProviderEnabled

public boolean isProviderEnabled(String provider)

getLastKnownLocation

public Location getLastKnownLocation(String provider)

addTestProvider

public void addTestProvider(String name,
                            boolean requiresNetwork,
                            boolean requiresSatellite,
                            boolean requiresCell,
                            boolean hasMonetaryCost,
                            boolean supportsAltitude,
                            boolean supportsSpeed,
                            boolean supportsBearing,
                            int powerRequirement,
                            int accuracy)

removeTestProvider

public void removeTestProvider(String provider)

setTestProviderLocation

public void setTestProviderLocation(String provider,
                                    Location loc)

clearTestProviderLocation

public void clearTestProviderLocation(String provider)

setTestProviderEnabled

public void setTestProviderEnabled(String provider,
                                   boolean enabled)

clearTestProviderEnabled

public void clearTestProviderEnabled(String provider)

setTestProviderStatus

public void setTestProviderStatus(String provider,
                                  int status,
                                  Bundle extras,
                                  long updateTime)

clearTestProviderStatus

public void clearTestProviderStatus(String provider)

addGpsStatusListener

public boolean addGpsStatusListener(GpsStatus.Listener listener)

removeGpsStatusListener

public void removeGpsStatusListener(GpsStatus.Listener listener)

addNmeaListener

public boolean addNmeaListener(GpsStatus.NmeaListener listener)

removeNmeaListener

public void removeNmeaListener(GpsStatus.NmeaListener listener)

getGpsStatus

public GpsStatus getGpsStatus(GpsStatus status)

sendExtraCommand

public boolean sendExtraCommand(String provider,
                                String command,
                                Bundle extras)


Copyright © 2008-2012. All Rights Reserved.