RemoteCallbackList.GetRegisteredCallbackItem(Int32) 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.
Return a currently registered callback.
[Android.Runtime.Register("getRegisteredCallbackItem", "(I)Landroid/os/IInterface;", "GetGetRegisteredCallbackItem_IHandler", ApiSince=26)]
public virtual Java.Lang.Object? GetRegisteredCallbackItem (int index);
[<Android.Runtime.Register("getRegisteredCallbackItem", "(I)Landroid/os/IInterface;", "GetGetRegisteredCallbackItem_IHandler", ApiSince=26)>]
abstract member GetRegisteredCallbackItem : int -> Java.Lang.Object
override this.GetRegisteredCallbackItem : int -> Java.Lang.Object
Parameters
- index
- Int32
Index of which callback registration to return, from 0 to
#getRegisteredCallbackCount()
- 1.
Returns
Returns whatever callback is associated with this index, or null if
#kill()
has been called.
- Attributes
Remarks
Return a currently registered callback. Note that this is <em>not</em> the same as #getBroadcastItem
and should not be used interchangeably with it. This method returns the registered callback at the given index, not the current broadcast state. This means that it is not itself thread-safe: any call to #register
or #unregister
will change these indices, so you must do your own thread safety between these to protect from such changes.
Java documentation for android.os.RemoteCallbackList.getRegisteredCallbackItem(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.