What is the difference between Android timer class and creating one with a Handler?
i tried both ways and i understand they can do different things but i dont know why,for example with android timer class i cant update views and i think that is a huge limitation,but with a handler the code feels messy.
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
public void run() {
//actions
}
}, 2000);
}
So,what is the best to do a action every tot seconds?
Edit:this isnt a duplicate because im asking about updating views with timers.