I would like to know if it is possible to have a listener in my application for notifying events when a file is added to the file system. Can someone kindly guide me with this.<
try this:
new FileObserver(path) { @Override public void onEvent(int event, String path) { if (event == FileObserver.CREATE) Toast.makeText(getActivity(), "File created", Toast.LENGTH_SHORT).show(); } }.startWatching();