English 中文(简体)
纽约总部 观察员不要求采用USB大规模储存方式
原标题:Android FileObserver not calling onEvent in USB mass storage mode

I have FileObserver s hooked onto a particular directory in /mnt/sdcard/X and its descendants recursively. When I modify contents of this directory from the phone itself (say from the Gallery app), the onEvent() of my FileObserver is correctly called and everything works fine.

当我通过USB与一台计算机连接,转而采用大规模储存模式时,通过计算机对同一目录进行的所有改动都不会被翻译给档案观察员。 是否限制档案观察员说它将不在美国大规模储存中工作?

我曾尝试过一次推波推波推波,X/xx,这一变化也得到了正确记录。

最佳回答

是否限制档案观察员说它将不在美国大规模储存中工作?

Nothing, 安装在Um Mass Stock(Android 1.x/2.x)上,安装有外部储存的仪器。 外部储存完全由已经安装的监督厅拥有。 在储存时,你不会获得<代码>File Observer。

Android 3.0+ uses the Media Transfer Protocol (MTP) instead of USB Mass Storage, and so FileObserver should work with external storage on newer versions of Android, even while another OS has access to that storage.

问题回答

暂无回答




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签