MediaScannerConnection, this syntax won't compile
<p>I'm trying to add a file in my data directory on my sdcard to the mediastore content provider. However, I fear that I may have a java education issue on my hands. MediaScannerConnectionClient is purportedly a nested class of MediaScannerConnection, but this syntax won't compile.</p>

<p>Here is the link to the MediaScannerConnection API: <a href="http://developer.android.com/reference/android/media/MediaScannerConnection.html" rel="nofollow">http://developer.android.com/reference/android/media/MediaScannerConnection.html</a></p>

<p>What would be the appropriate way to reference scanner?</p>

<p>Thanks!</p>

<pre><code>final String filename = (new File(img.uri.toString())).getAbsolutePath().substring(6);

        final MediaScannerConnection scanner = new MediaScannerConnection(this,
                new MediaScannerConnectionClient() {
                    public void onMediaScannerConnected() {
                        MediaScannerConnection.this.scanFile(filename, null /*mimeType*/);
                    }

                    public void onScanCompleted(String path, Uri uri) {
                         MediaScannerConnection.this.disconnect();
                    }
            });
        scanner.connect();
</code></pre>
