Android.OS.CancellationSignal.SetOnCancelListener Method
Sets the cancellation listener to be called when canceled.

Syntax

[Android.Runtime.Register("setOnCancelListener", "(Landroid/os/CancellationSignal$OnCancelListener;)V", "")]
public void SetOnCancelListener (CancellationSignal.IOnCancelListener listener)

Parameters

listener
The cancellation listener, or null to remove the current listener.

Remarks

Sets the cancellation listener to be called when canceled. This method is intended to be used by the recipient of a cancellation signal such as a database or a content provider to handle cancellation requests while performing a long-running operation. This method is not intended to be used by applications themselves. If CancellationSignal.Cancel has already been called, then the provided listener is invoked immediately. This method is guaranteed that the listener will not be called after it has been removed.

[Android Documentation]

Requirements

Namespace: Android.OS
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 16