I simply want to update a TextView periodically by a service. Let\'s say the TextView should display the time and update itself every 30 seconds. Could\'t you guys tell me how I
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);