Android FileObserver battery drain

一笑奈何 提交于 2019-12-11 05:59:13

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!