1. DenPit85's Avatar
    Can anyone show me an example of how to incorporate these in an Android program. I need a short time delay in an App I am writing and I think that the Java Timer and TimerTask could be the answer but I do not know how to implement them in the code.
    06-04-2014 06:14 AM
  2. LastAtaman's Avatar
    Much better to use a CountDownTimer instead.
    Sorry I cann't place a code here, forum gives me an error cause I just registered here.
    08-04-2014 03:26 AM
  3. LastAtaman's Avatar
    Code:
    countDownTimer = new CountDownTimer(timerLife, tickInterval) 
    {
    	@Override
    	public void onFinish() 
    	{
    		// WRITE YOUR CODE TO RUN AFTER A DELAY
    	}
    
    	@Override
    	public void onTick(long millisUntilFinished) 
    	{
    		
    	}
    }.start();
    08-04-2014 05:23 AM

Similar Threads

  1. Android programming
    By jkepler in forum Software Development and Hacking
    Replies: 61
    Last Post: 07-03-2016, 09:15 AM
  2. Replies: 7
    Last Post: 07-21-2014, 11:20 PM
  3. Replies: 1
    Last Post: 06-04-2014, 10:24 AM
  4. Transfer Music Player playlists to doubletwist?
    By zigibogido in forum Android Apps
    Replies: 0
    Last Post: 06-04-2014, 05:05 AM
LINK TO POST COPIED TO CLIPBOARD