Android.OS.FileObserver.OnEvent Method
The event handler, which must be implemented by subclasses.

Syntax

[Android.Runtime.Register("onEvent", "(ILjava/lang/String;)V", "GetOnEvent_ILjava_lang_String_Handler")]
public abstract void OnEvent ([Android.Runtime.GeneratedEnum] FileObserverEvents e, string path)

Parameters

e
The type of event which happened
path
The path, relative to the main monitored file or directory, of the file or directory which triggered the event

Remarks

The event handler, which must be implemented by subclasses.

This method is invoked on a special FileObserver thread. It runs independently of any threads, so take care to use appropriate synchronization! Consider using Handler.Post(Java.Lang.IRunnable) to shift event handling work to the main thread to avoid concurrency problems.

Event handlers must not throw exceptions.

[Android Documentation]

Requirements

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