Getting The Recent Images From Gallery From Cursor Using Contentresolver
I'm using Cursor to get the images from gallery and getting all the images from gallery, is there any way to get only few recent images, such as last 20 image captured. One more p
Solution 1:
The order by argument to query(), per documentation, is formatted as a SQL order by statement. If you want the values in descending order as opposed to the default ascending order, do this:
finalStringorderBy= MediaStore.Images.Media._ID + " DESC";
But you specifically asked about using the date as the ordering, so you probably want this instead:
finalStringorderBy= MediaStore.Images.Media.DATE_ADDED + " DESC";
Post a Comment for "Getting The Recent Images From Gallery From Cursor Using Contentresolver"