Code example for FileObserver

Methods: startWatching

0
 
    @Override 
    protected void onResume() { 
        super.onResume(); 
        if (mFileObserver != null) {
            mFileObserver.startWatching();
        } 
    } 
 
    /** 
     * 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"); 
        } else if (!dir.isDirectory()) {