music - Android: How to exclude ringtones and notifications from songs -


i developing music player application , querying album names through following code :

cursor mediacur = managedquery(mediastore.audio.media.external_content_uri, null, null, null, null); mediacur.movetofirst(); do{         albumindex = mediacur.getcolumnindex(mediastore.audio.media.album);         albumname = mediacur.getstring(albumindex);         songs.add(albumname);   }while(mediacur.movetonext()); 

i getting album names along ringtones , notifications too. how can exclude ringtones , notifications list?

add selection managed query call.

string selection = mediastore.audio.media.is_music + " != 0"; cursor mediacur = managedquery(mediastore.audio.media.external_content_uri, null, selection, null, null); 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -