问题
I'm implementing a file observer in the main activity of a home replacement app. Does it drain battery?
Thanks
回答1:
FileObserver should not drain battery.
FileObserver listens for iNotify events, which are implemented as core functionality via the Linux kernel.
Just initialize your FileObserver with the events you want to listen to and implement the onEvent callback: it should be okay.
来源:https://stackoverflow.com/questions/20223155/android-fileobserver-battery-drain