FileObserver 无法在 XOOM android 3.1 中工作

发布于 2024-11-28 08:40:36 字数 294 浏览 6 评论 0原文

在我的应用程序中,我在 /mnt/sdcard/dcim/camera 文件夹中有一个 FileObserver,以便每当从相机拍摄图像时我的应用程序都会收到通知。它在 Android 2.1/2.2/2.3 手机上按预期工作。我试图让它在 Android 3.1/3.2 的 Motorola Xoom 上运行,但它不起作用。我检查了此文件夹是否存在,并且每当使用相机应用程序拍摄图像时,都会在 /mnt/sdcard/dcim/camera 中创建包含该图像的文件,但不知何故不会调用 FileObserver 的 OnEvent() 方法。其他人也遇到过同样的问题吗?

In my app I have a FileObserver on /mnt/sdcard/dcim/camera folder so that whenever an image is taken from a camera my app is notified. It works as expected on phones having Android 2.1/2.2/2.3. I am trying to make it work on a Motorola Xoom with Android 3.1/3.2 but it doesnt work. I checked this folder exists and whenever an image is taken using the camera app that a file with that image is created in /mnt/sdcard/dcim/camera but somehow OnEvent() method of FileObserver is not called. Anyone else faced the same issue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文