I use the following code, it selects an image from the gallery and displays the image in random order
String[] columns = { MediaStore.Images.Media.DATA, MediaStore.Images.Media._ID }; String orderBy = MediaStore.Images.Media._ID; imagecursor = managedQuery(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, columns, null,null, orderBy); int image_column_index = imagecursor.getColumnIndex(MediaStore.Images.Media._ID);
I want the images to be sorted by the date in which they were taken (for example: Last first and oldest photos later) ...
and another problem: when I use the code above, it only uploads images to the DCIM folder, I want all the images from the phone to be ........
source share