Code example for Timer

Methods: cancel, purge

0
                if (location.getAccuracy() < requiredAccuracy){
                    fixTime = location.getTime();
                    lastLocation = location;
                    ready = true;
                    locationManager.removeUpdates(this);
                    timer.cancel();
                    timer.purge();
                    inform(); 
                }else 
                    inform(); 
            } 
 
            public void onStatusChanged(String s, int i, Bundle bundle) {
            } 
 
            public void onProviderEnabled(String s) {
            } 
 
            public void onProviderDisabled(String s) {
            } 
        };