IBinder.Transact(Int32, Parcel, Parcel, TransactionFlags) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Perform a generic operation with the object.
[Android.Runtime.Register("transact", "(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z", "GetTransact_ILandroid_os_Parcel_Landroid_os_Parcel_IHandler:Android.OS.IBinderInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
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", "GetTransact_ILandroid_os_Parcel_Landroid_os_Parcel_IHandler:Android.OS.IBinderInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member 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 #FIRST_CALL_TRANSACTION
and
#LAST_CALL_TRANSACTION
.
- 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 #FLAG_ONEWAY
for a one-way RPC.
Returns
Returns the result from Binder#onTransact
. A successful call
generally returns true; false generally means the transaction code was not
understood. For a oneway call to a different process false should never be
returned. If a oneway call is made to code in the same process (usually to
a C++ or Rust implementation), then there are no oneway semantics, and
false can still be returned.
- Attributes
Exceptions
Remarks
Perform a generic operation with the object.
Java documentation for android.os.IBinder.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.