Partager via


Handler.SendMessageDelayed(Message, Int64) Method

Definition

Enqueue a message into the message queue after all pending messages before (current time + delayMillis).

[Android.Runtime.Register("sendMessageDelayed", "(Landroid/os/Message;J)Z", "")]
public bool SendMessageDelayed (Android.OS.Message msg, long delayMillis);
[<Android.Runtime.Register("sendMessageDelayed", "(Landroid/os/Message;J)Z", "")>]
member this.SendMessageDelayed : Android.OS.Message * int64 -> bool

Parameters

msg
Message
delayMillis
Int64

Returns

Returns true if the message was successfully placed in to the message queue. Returns false on failure, usually because the looper processing the message queue is exiting. Note that a result of true does not mean the message will be processed -- if the looper is quit before the delivery time of the message occurs then the message will be dropped.

Attributes

Remarks

Enqueue a message into the message queue after all pending messages before (current time + delayMillis). You will receive it in #handleMessage, in the thread attached to this handler.

Java documentation for android.os.Handler.sendMessageDelayed(android.os.Message, long).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to