Code example for ScheduledThreadPoolExecutor

Methods: execute, shutdown

0
			activity.startLocation();
		} 
 
		public void setStatus(String status) {
			this.status = status;
			scheduledThreadPoolExecutor.execute(forcePingTask);
			if (status.equals(INACTIVE)) {
				Log.i(TAG, "Shutting down thread, service marked as inactive");
				scheduledThreadPoolExecutor.shutdown();
			} 
		} 
 
		public String getStatus() {
			return status;
		} 
 
		public void setActive(boolean active) {
			this.active = active;
			if (active)
				startReceivingLocation(); 
			else