Android examples for Map:Location
Unregisters provided listener from the LocationManager .
//package com.java2s; import android.content.Context; import android.location.LocationListener; import android.location.LocationManager; public class Main { /**/* w w w. ja va2 s . com*/ * Unregisters provided {@code listener} from the {@link LocationManager}. */ public static void unregister(Context context, LocationListener listener) { final LocationManager locationManager = (LocationManager) context .getSystemService(Context.LOCATION_SERVICE); locationManager.removeUpdates(listener); } }