android - Stopwatch that works on background -


are there sample stopwatch project ( or tutorial ) stopwatch timer shown in notificationbar , keep working if application closed ?

a simple countdown timer work, , persist through onpause() if allow to.

new countdowntimer(30000, 1000) {       public void ontick(long millisuntilfinished) {          mtextfield.settext("seconds remaining: " + millisuntilfinished / 1000);      }       public void onfinish() {          mtextfield.settext("done!");      }   }.start(); 

refer this source more information. can update textviews if need show timer.

edit count specifically, try chronometer, can found @ this link. can find demo of in samples apk.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -