Handler. This object contains two extra int fields and an
extra object field that allow you to not do allocations in many cases.
While the constructor of Message is public, the best way to get
one of these is to call Message.obtain() or one of the
Handler.obtainMessage() methods, which will pull
them from a pool of recycled objects.
Handler has its own name-space
for message codes, so you do not need to worry about yours conflicting
with other handlers.
Messenger to send the message across processes this can only
be non-null if it contains a Parcelable of a framework class (not one
implemented by the application). For other data transfer use
setData(android.os.Bundle).
Note that Parcelable objects here are not supported prior to
the release.
Build.VERSION_CODES.FROYO
obtain(), but copies the values of an existing
message (including its target) into the new one.
orig Original message to copy.obtain(), but sets the value for the target member on the Message returned.
h Handler to assign to the returned Message object's target member.obtain(android.os.Handler), but assigns a callback Runnable on
the Message that is returned.
h Handler to assign to the returned Message object's target member.callback Runnable that will execute when the message is handled.obtain(), but sets the values for both target and
what members on the Message.
h Value to assign to the target member.what Value to assign to the what member.obtain(), but sets the values of the target, what, and obj
members.
h The target value to set.what The what value to set.obj The object method to set.obtain(), but sets the values of the target, what,
arg1, and arg2 members.
h The target value to set.what The what value to set.arg1 The arg1 value to set.arg2 The arg2 value to set.obtain(), but sets the values of the target, what,
arg1, arg2, and obj members.
h The target value to set.what The what value to set.arg1 The arg1 value to set.arg2 The arg2 value to set.obj The obj value to set.Handler that is receiving this Message to
dispatch it. If
not set, the message will be dispatched to the receiving Handler's
Handler.handleMessage(Message Handler.handleMessage()).
setData(android.os.Bundle). Note that when transferring data across
processes via Messenger, you will need to set your ClassLoader
on the Bundle via Bundle.setClassLoader() so that it can instantiate your objects when
you retrieve them.
peekData()setData(android.os.Bundle)getData() for further information on this.
getData()setData(android.os.Bundle)getData()peekData()getTarget().
Throws a null pointer exception if this field has not been set.