Question

In a custom audio recorder and I am saving my recorded files in the Folder created as-

File direct = new File(Environment.getExternalStorageDirectory() + "/New Folder");

if(!direct.exists())
{
    if(direct.mkdir()) 
      {
       //directory is created.......;
      }

}

Saving my files to this folder is done. (in 3GP format). The problem is when Media Scanner runs after some time, these (Recorded files) are coming in my Songs List. How to stop these files to come in the Songs list.

Thanks

Was it helpful?

Solution

Add .nomedia file in your folder.It will stop your Media scanner to scan your recorded files.

Create .nomedia files by Notepad :

Open notepad. ► After opening notepad file, don't write anything in that file. Just leave it totally blank, not even any space or symbol. ► Than in notepad Menu-bar, go to "Save As" option. ► In Save as Dialog Box, select "All files (.)". ► In File name box, type .nomedia and click on Save..nomedia file is ready.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top