service - Android - Update TextView periodically -
i want update textview periodically service. let's textview should display time , update every 30 seconds. could't guys tell me how can accomplish that? know need receiver tried did't work @ all.
i'm new android, maybe can maintain simple :d
in oncreate() //updating every 30 seconds
handler handler =new handler(); final runnable r = new runnable() { public void run() { handler.postdelayed(this, 30000); string mydate = java.text.dateformat.getdatetimeinstance().format(calendar.getinstance().gettime()); edittextid.settext(mydate); } }; handler.postdelayed(r, 0000);
android service
No comments:
Post a Comment