Code example for FileObserver

Methods: startWatching

    protected void onResume() { 
        if (mFileObserver != null) {
     * Change the directory that is currently being displayed. 
     * @param dir 
     *            The file the activity should switch to. This File must be 
     *            non-null and a directory, otherwise the displayed directory 
     *            will not be changed 
    private void changeDirectory(File dir) {
        if (dir == null) {
            debug("Could not change folder: dir was null"); 
Experience pair programming with AI  Get Codota for Java