A Handler allows you to send and process Message and Runnable objects associated with a thread's MessageQueue.
private class DataSentRunnable implements Runnable {
private RPStream stream;
public DataSentRunnable(RPStream stream) {
this.stream = stream;
}
public void run() {
parent.onDataSent(stream);
}
}
Handler handle = new Handler();
this.handler.post(cr); (or postDelayed())
All based on Topics