Find the Last photo taken!!?plzzzzz

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

Find the Last photo taken!!?plzzzzz

Postby hadiosbourne » Sun Nov 15, 2009 8:30 am

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 Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 6 guests