Search in sources :

Example 41 with LocationListener

use of android.location.LocationListener in project android_frameworks_base by crdroidandroid.

the class LocationBasedCountryDetector method stop.

/**
     * Stop the current query without notifying the listener.
     */
@Override
public synchronized void stop() {
    if (mLocationListeners != null) {
        for (LocationListener listener : mLocationListeners) {
            unregisterListener(listener);
        }
        mLocationListeners = null;
    }
    if (mTimer != null) {
        mTimer.cancel();
        mTimer = null;
    }
}
Also used : LocationListener(android.location.LocationListener)

Aggregations

LocationListener (android.location.LocationListener)41 Location (android.location.Location)34 Bundle (android.os.Bundle)34 LocationManager (android.location.LocationManager)22 BluetoothAdapter (android.bluetooth.BluetoothAdapter)12 Timer (java.util.Timer)6 TimerTask (java.util.TimerTask)6 Criteria (android.location.Criteria)5 IOException (java.io.IOException)3 Intent (android.content.Intent)2 Point (com.esri.core.geometry.Point)2 FacebookException (com.facebook.FacebookException)2 ArrayList (java.util.ArrayList)2 SuppressLint (android.annotation.SuppressLint)1 PendingIntent (android.app.PendingIntent)1 CanceledException (android.app.PendingIntent.CanceledException)1 PackageManager (android.content.pm.PackageManager)1 ResolveInfo (android.content.pm.ResolveInfo)1 GpsSatellite (android.location.GpsSatellite)1 GpsStatus (android.location.GpsStatus)1