Mediascanner not working in 2.2 and above
<p>Can someone please tell me why the following works fine on 2.1 and not on 2.2 or 3.1?  The final toast message even shows indicating MediaScanner completed.</p>

<pre><code>    scanner = new MediaScannerConnection(this,
            new MediaScannerConnection.MediaScannerConnectionClient () {

                public void onMediaScannerConnected() {
                    Log.v("SCANNER"," CONNECTED: "+outputFile.getPath());
                    scanner.scanFile(outputFile.getPath(), null);

               }

                public void onScanCompleted(String path, Uri uri) {
                    if (path.equals(outputFile.getPath())) {

                        PhotoPager.this.runOnUiThread(new Runnable() {
                            public void run() {
                                Toast
                                    .makeText(PhotoPager.this,
                                        "Image has been saved",
                                        Toast.LENGTH_SHORT)
                                    .show();
                            }
                        }); 

                    }
                    scanner.disconnect();
                }
           }
     );
</code></pre>
