Sdílet prostřednictvím


Binder Constructors

Definition

Overloads

Binder()

Default constructor just initializes the object.

Binder(String)

Constructor for creating a raw Binder object (token) along with a descriptor.

Binder(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Binder()

Default constructor just initializes the object.

[Android.Runtime.Register(".ctor", "()V", "")]
public Binder ();
Attributes

Remarks

Default constructor just initializes the object.

If you're creating a Binder token (a Binder object without an attached interface), you should use #Binder(String) instead.

Java documentation for android.os.Binder.Binder().

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

Binder(String)

Constructor for creating a raw Binder object (token) along with a descriptor.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "", ApiSince=29)]
public Binder (string? descriptor);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "", ApiSince=29)>]
new Android.OS.Binder : string -> Android.OS.Binder

Parameters

descriptor
String

Used to identify the creator of this token, for example the class name. Instead of creating multiple tokens with the same descriptor, consider adding a suffix to help identify them.

Attributes

Remarks

Constructor for creating a raw Binder object (token) along with a descriptor.

The descriptor of binder objects usually specifies the interface they are implementing. In case of binder tokens, no interface is implemented, and the descriptor can be used as a sort of tag to help identify the binder token. This will help identify remote references to these objects more easily when debugging.

Java documentation for android.os.Binder.Binder(java.lang.String).

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

Binder(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected Binder (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.OS.Binder : nativeint * Android.Runtime.JniHandleOwnership -> Android.OS.Binder

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

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