Code example for Handler

Methods: postAtTime

0
	} 
 
	private Runnable updaterTask = new Runnable() {
		public void run() { 
			getUpdate(); 
			mHandler.postAtTime(this, 
					SystemClock.uptimeMillis()+getUpdateFrequency()); 
		} 
	}; 
 
	private void startUpdater() { 
 
		mHandler.removeCallbacks(updaterTask);
		mHandler.postDelayed(updaterTask, 100);
 
	} 
 
	private void stopUpdater() { 
		mHandler.removeCallbacks(updaterTask);
		//if (timer != null) timer.cancel(); 
Experience pair programming with AI  Get Codota for Java