Udostępnij za pośrednictwem


Binder.Transact(Int32, Parcel, Parcel, TransactionFlags) Method

Definition

Default implementation rewinds the parcels and calls onTransact.

[Android.Runtime.Register("transact", "(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z", "")]
public bool Transact (int code, Android.OS.Parcel data, Android.OS.Parcel? reply, Android.OS.TransactionFlags flags);
[<Android.Runtime.Register("transact", "(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z", "")>]
abstract member Transact : int * Android.OS.Parcel * Android.OS.Parcel * Android.OS.TransactionFlags -> bool
override this.Transact : int * Android.OS.Parcel * Android.OS.Parcel * Android.OS.TransactionFlags -> bool

Parameters

code
Int32

The action to perform. This should be a number between FirstCallTransaction and LastCallTransaction.

data
Parcel

Marshalled data to send to the target. Must not be null. If you are not sending any data, you must create an empty Parcel that is given here.

reply
Parcel

Marshalled data to be received from the target. May be null if you are not interested in the return value.

flags
TransactionFlags

Additional operation flags. Either 0 for a normal RPC, or FlagOneway for a one-way RPC.

Returns

Implements

Attributes

Exceptions

Remarks

Default implementation rewinds the parcels and calls onTransact. On the remote side, transact calls into the binder to do the IPC.

Java documentation for android.os.Binder.transact(int, android.os.Parcel, android.os.Parcel, int).

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