I want to implement some code that detect any file change (txt, doc, pdf etc.) to trigger some task with RXJava. Is it possible? Any suggestion? Thanks in advance.
Of course it's possible. I'd do that in the following way:
onFileChange(File)
required for this taskFlowable
(backpressure-aware) or Observable
type, which wraps listener created above - this will require some RxJava knowledge - you'll need to invoke onNext(...)
method on the Emitter
inside the Flowable
implementation and define the type, you need to return within the Flowable
- e.g. Flowable<FileEvent>
where FileEvent
have to be defined