Code example for ScheduledThreadPoolExecutor

Methods: shutdownNow

	public void onDestroy(){ 
		//stops drink timer to make sure we dont have any issues 
		//Persist Data 
	public IBinder onBind(Intent arg0) {
		return null; 
	//Custom methods for drink scheduler 
	public long calculateInterval(int tarDrinks, long startTime, long tarTime){
		long difference = Math.abs(tarTime-startTime);
		long interval = difference /tarDrinks; 
		return interval;
Connect your IDE to all the code out there  Get Codota for Java