gop
gop

Reputation: 2200

FileObserver UnsatisfiedLinkError

I am trying to implement FileObserver following this tutorial http://www.roman10.net/android-fileobserverthe-underlying-inotify-mechanism-and-an-example/ and I start it from a service(onCreate()) like this:

FileObserver fo = new FileObserver("/sdcard", FileObserver.CREATE) {

 @Override
 public void onEvent(int event, String path) {
  L.l(path + " created");
 }
};
fo.startWatching();

but I get java.lang.UnsatisfiedLinkError: init

Can anyone suggest how am I supposed to setup the FileObserver? I haven't used JNI and maybe I am missing something there.

Upvotes: 0

Views: 168

Answers (1)

gop
gop

Reputation: 2200

Nevermind, it turned out that I made a mistake trying to use the actual source code of the FileObserver and compile&run it instead of using the FileObserver from the framework. My bad.

Upvotes: 0

Related Questions