I wnat to do something after pressing button in android But i want automaticlly it run. do I use while() and sleep() in onClick() ?????? or use handler?
private Button b_get;
b_get = (Button)findViewById(R.id.get);
b_get.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// do something several times after 20 Seconds
}
}
});