Find the Last photo taken!!?plzzzzz

All your problems with Audio, Video and Images.

Find the Last photo taken!!?plzzzzz

Postby hadiosbourne » Wed Nov 11, 2009 12:21 pm

Hi everyone i'm looking for a method to invoke the location of the last image taken in the gallery,
does any one has any suggestions? thanks!!
Using this method i'm able to get the first image,but i'm looking for the last image,thanks!!



String [] proj={MediaStore.Images.Media.DATA};
//String [] date={MediaStore.Images.Media.DATE_TAKEN};
// Now we create the cursor pointing to the external thumbnail store
cursor = managedQuery( MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
proj, // Which columns to return
null, // WHERE clause; which rows to return (all rows)
null, // WHERE clause selection arguments (none)
null); // Order-by clause (ascending by name)

column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
cursor.moveToPosition((int)getSelectedItemId());
// And here we get the filename
String filepath = cursor.getString(column_index);
hadiosbourne
Junior Developer
Junior Developer
 
Posts: 16
Joined: Tue Oct 06, 2009 10:58 am

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: Exabot [Bot] and 18 guests