Showing posts with label nomedia. Show all posts
Showing posts with label nomedia. Show all posts

Saturday, June 8, 2013

Android cpu usage and disk consumption

I came across an interesting topic on the matter of cpu usage being terribly high on Android tablets.  In my experience and via Watchdog Lite's monitoring, I've deduced that the media scanner in Android is a common resource hog.  I, however, didn't know how to deal with it until now.  Browsing through forums, someone pitched the idea of using a storage analyzer.  This will give you an idea which folders in your system hold the most number of files and which are eating up your space.

Using such tools and there are plenty on Google Play, I found that a lot of the Gameloft games have huge number of files and which ones have large disk space consumption.  Since the media scanner is such a darn plonker and has to scan your entire system, we need to make it stop from the insanity.

What I did was place a bunch of .nomedia files on the largest folders that I know shouldn't be scanned at all.  It seems to help with performance quite a bit!  As far as I can tell, the file also kills folder lookup recursion, so it should help the media scanner behave.  Try it!

Friday, March 1, 2013

Lessons on Android and Multimedia files

First off, if you're looking to skip folders from being scanned, put the .nomedia file inside the folder.  Second, using my A500 for music has lead to several particularly annoying issues.  Putting music in the micro SD card is just bad news.  Very, bad news.  My music players would pick up duplicate entries of the music files which is reminiscent to my problems with the original Google gallery.  That app would pick up and duplicate entries in its cache when the micro SD card needed to be reloaded.

Lesson learned.  Do not put music in the micro SD Card.

Cleaning up the crap takes a bit of time and effort, but if you've isolated your files in a folder, that's good.  Rename your folder and put the .nomedia file on it to keep Android from re-scanning and grabbing those poor files.  I then used Winamp to purge all the music in the library which just removes Android's internal mapping.  To be sure, load up each of your music players and make sure none of the music gets picked up.  Move your music folder to /sdcard and remove the .nomedia file.  Reboot your device and then run a music app which should begin re-scanning your device for media.

Hopefully, that will tidy up your music player.