Code example for FileObserver

Methods: stopWatching

0
 
    @Override 
    protected void onPause() { 
        super.onPause(); 
        if (mFileObserver != null) {
            mFileObserver.stopWatching();
        } 
    } 
 
    @Override 
    protected void onResume() { 
        super.onResume(); 
        if (mFileObserver != null) {
            mFileObserver.startWatching();
        } 
    } 
 
    /** 
     * Change the directory that is currently being displayed. 
     * 
     * @param dir