runnable - How to auto refresh data displayed in my Android Activity every second -


i need auto refresh data displayed in activity every second, i've used runnable, timer etc. these works after few seconds ui slow , not responsive. i've read intentservice don't think it's idea use infinite loops in intentservice. there i'm missing, please help.

maybe help:

private class waittimer extends timertask {         @override         public void run() {             //every 5 seconds             if(millis % 5 == 0) {                 //do magic here             }             millis+=1         } } 

and in oncreate()

millis = 0; timer = new timer(); timer.schedule(new waittimer(), 0, 1000); 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -