[android-developers] Re: refresh the gallery without restart the emulator

2011-04-14 Thread cervello
I succesed. Thank you. Here is my code; private MediaScannerConnection mediaconnect; private MediaScannerConnectionClient _mediaScanConnectionClient = new MediaScannerConnectionClient() { public void onMediaScannerConnected() { mediaconnect.scanFile(filename2,

Re: [android-developers] Re: refresh the gallery without restart the emulator

2011-04-09 Thread Mark Murphy
On Sat, Apr 9, 2011 at 7:47 PM, cervello wrote: > But in onScanCompleted one of the parameter is the uri..Shouldn't I > use this function? If you use the other flavor of scanFile, one that takes a MediaScannerConnection.OnScanCompletedListener object, you will need to implement onScanCompleted()

[android-developers] Re: refresh the gallery without restart the emulator

2011-04-09 Thread cervello
But in onScanCompleted one of the parameter is the uri..Shouldn't I use this function? Can you write an example code? I couldn't find how it should be.. I'm confused.. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group,

Re: [android-developers] Re: refresh the gallery without restart the emulator

2011-04-09 Thread Mark Murphy
There is no Uri. The parameters to scanFile() are a path and a MIME type. On Sat, Apr 9, 2011 at 5:28 PM, cervello wrote: > I still try but first off all can you tell me what the uri means here?? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commons

[android-developers] Re: refresh the gallery without restart the emulator

2011-04-09 Thread cervello
I still try but first off all can you tell me what the uri means here?? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to a

Re: [android-developers] Re: refresh the gallery without restart the emulator

2011-04-09 Thread Mark Murphy
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 wrote: > Should I do something like this? but it's not correct

[android-developers] Re: refresh the gallery without restart the emulator

2011-04-09 Thread cervello
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(