The android Handler class contains this method:
public final boolean postAtTime (Runnable r, Object token, long uptimeMillis)
to post a Runnable at a given time. The token can be used later to remove the callback to r from the message queue thanks to this method:
public final void removeCallbacks (Runnable r, Object token)
The following method doesn’t exist in the Handler class
public final boolean postDelayed (Runnable r, Object token, long delay)
Is there a good reason for not providing such a method?
After looking at the source code, the token object eventually passes to the Message:
And postDelay
If what you want is
Then why not just use
since its the same.
Update, forgot to add this: