Android的FileObserver电池消耗 [英] Android FileObserver battery drain

查看:381
本文介绍了Android的FileObserver电池消耗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实施家庭替代应用的主要活动的文件观察者。
是否耗尽电池?

I'm implementing a file observer in the main activity of a home replacement app. Does it drain battery?

感谢

推荐答案

FileObserver不应该耗尽电池。

FileObserver should not drain battery.

FileObserver监听其作为在Linux内核中的核心功能,实现inotify事件。
只是你要听和实施的onEvent回调的事件初始化FileObserver。它应该没问题。

FileObserver listens for iNotify events which is implemented as a core functionality in the Linux kernel. Just initialize your FileObserver with the events you want to listen to and implement the onEvent callback. It should be ok.

这篇关于Android的FileObserver电池消耗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆