How to prevent Android from scanning select folders on start up

Many Android phones like the Sony Xperia and Samsung, use the Media Scanner service that starts up when you switch on your Android phone. This service crawls through all folders in the storage card or the storage memory. This would mean that Android applications such as the Gallery and Media players can identify your files quickly and create thumbnails.

To prevent the Media Scanner from crawling through all your folders, you can put an empty file with the name of .nomedia in the folders that you do not wish Media Scanner to look into. If it is put in the top most folder, then all sub folders below that will not be scanned. It is best to put this file in those folders that are private. To do this, use any text editor on the Android and create a file. Save it as .nomedia into the folder you do not want media scanner to scan.