Code example for MediaScannerConnection

Methods: disconnect, isConnected

0
     */ 
    public void disconnect() { 
        if (mediaScanner == null) {
            return; 
        } 
        if (!mediaScanner.isConnected()) {
            return; 
        } 
        mediaScanner.disconnect();
    } 
     
    void createMediaScanner() { 
        mediaScanner = new MediaScannerConnection(context, 
                new MediaScannerClient()); 
        mediaScanner.connect();
    } 
     
    /** 
     *  Returns true if the connection to media scanner is established and 
     *  the queue of the scans, which came while connecting, is empty. 
     */