what is the difference between both , which to use when any idea and which is the best to keep track of a directory change like delete file moved file?
Asked
Active
Viewed 382 times
1 Answers
0
FileObserver is Android based while WatchService is Java based. You can use WatchService in Android as well since Android is a robust package of Java. Just as Java Serializable is to Android Parcellable, so is WatchService is to FileObserver. I bet you, Android implementation works best as speed, efficiency and memory consciousness are better taken into account in Android

Show Young Soyinka
- 544
- 3
- 14
-
thanks for the answer. I am trying to update the recyclerview if the file is deleted or moved from the apps directory. Should i use fileobserver – Alex Boro Sep 25 '18 at 18:32
-
You can find the best answer here http://automagic4android.com/forum/viewtopic.php?t=6937 – Show Young Soyinka Sep 25 '18 at 19:51
-
-
Check this answer https://stackoverflow.com/questions/48034748/how-to-monitor-folder-for-file-changes-in-background – Show Young Soyinka Sep 26 '18 at 06:31