I have a tab in my app where I list all the songs available . However , I get complaints from few users that some of the songs which are visible in File Manager are not getting displayed . This is the cursor query I use
public static Cursor getAllSongsCursor(Context mContext){
String selection= MediaStore.Audio.Media.DURATION + " >=" + minTimeSongLimit;
String sortBy = SortArgFactory.getSortBy(FactoryConstants.TRACKS);
Cursor cursor = mContext.getApplicationContext().getContentResolver().query(
MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,
null,
selection,
null,
sortBy);
return cursor;
}
I am not able to figure out why this cursor query does not display all the songs which matches the selection condition.
Any help will be much appreciated .
( I have tried giving multiple patches to different customers but almost always they dont follow up and its working perfectly in all our test scenarios )