You use the MediaScannerConnection when you add a new file to external storage that the MediaStore needs. Your code below seems to have nothing to do with adding new files to external storage.
On Sat, Apr 9, 2011 at 12:34 PM, cervello <[email protected]> wrote: > Should I do something like this? but it's not correct.. > > public void onCreate( Bundle savedInstanceState ) { > > super.onCreate( savedInstanceState ); > setContentView( R.layout.main ); > > ListView videoListView = (ListView)findViewById(R.id.List); > videoListView.setAdapter(new ArrayAdapter<String>(this, > android.R.layout.simple_list_item_1, getListOfVideos())); > > > videoListView.setOnItemClickListener(videoListItemClickListener); > > MediaScannerConnection mScanner; > > mScanner = new MediaScannerConnection(this, new > MediaScannerConnection.MediaScannerConnectionClient() { > public void onMediaScannerConnected() { > mScanner.scanFile(filename2, null /* mimeType > */); > } > > public void onScanCompleted(String path, Uri uri) { > if (path.equals(filename2.toString())) { > mScanner.disconnect(); > } > } > }); > > mScanner.connect(); > } > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.6 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

