Code example for ScheduledThreadPoolExecutor

Methods: shutdown

0
			scheduledThreadPoolExecutor = new ScheduledThreadPoolExecutor(1);
			setStatus(ACTIVE);
		} 
 
		public void stop() { 
			scheduledThreadPoolExecutor.shutdown();
		} 
 
		public void onLocationChanged(Location location) {
			// Log.i(TAG, "[" + location.getProvider() + "](" + location.getLatitude() + "," + location.getLongitude() + ") accuracy: " + location.getAccuracy()); 
			if (!active) {
				//Log.i(TAG, "But the LocationService is inactive, so not storing it."); 
				return; 
			} 
			lastLocation = location;
			lastLocations.put(location.getProvider(), location);
		} 
 
		private void ping() { 
			String pingStatus = this.status;