android - Runnable not run -


i using handler , runnable display time of media player. runnable don't run. code is:

handler timerhandler;  public contstructor() {         timerhandler = new handler();     } 

i'm using:

runnable sourcetimer = new runnable() {         @override         public void run() {              long totalduration = source.getduration();             long currentduration = source.getcurrentposition();              string remaindurationlabel = millisecondstotimer(totalduration - currentduration);             log.e(tag, "source remain time " + remaindurationlabel);              timerhandler.postdelayed(this, 100);         }     }; 

start timer:

void sourceplay() {         source.start();         timerhandler.postdelayed(sourcetimer, 0);     } 

i don't receive error not logging "source remain time " in logcat.

what's problem?


Comments

Popular posts from this blog

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -

php - Autoloader issue not returning Class -