Handler.SendMessageAtTime(Message, Int64) Method

Definition

Enqueue a message into the message queue after all pending messages before the absolute time (in milliseconds) <var>uptimeMillis</var>.

[Android.Runtime.Register("sendMessageAtTime", "(Landroid/os/Message;J)Z", "GetSendMessageAtTime_Landroid_os_Message_JHandler")]
public virtual bool SendMessageAtTime (Android.OS.Message msg, long uptimeMillis);
[<Android.Runtime.Register("sendMessageAtTime", "(Landroid/os/Message;J)Z", "GetSendMessageAtTime_Landroid_os_Message_JHandler")>]
abstract member SendMessageAtTime : Android.OS.Message * int64 -> bool
override this.SendMessageAtTime : Android.OS.Message * int64 -> bool

Parameters

msg
Message
uptimeMillis
Int64

The absolute time at which the message should be delivered, using the android.os.SystemClock#uptimeMillis time-base.

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 the absolute time (in milliseconds) <var>uptimeMillis</var>. <b>The time-base is android.os.SystemClock#uptimeMillis.</b> Time spent in deep sleep will add an additional delay to execution. You will receive it in #handleMessage, in the thread attached to this handler.

Java documentation for android.os.Handler.sendMessageAtTime(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