After looking at more MediaStore examples I came up with this and it gets the job done.
protected ArrayList<Uri> GetImageList(boolean getThumbs)
{
ArrayList<Uri> images = new ArrayList<Uri>();
String columnType;
Uri contentType;
String[] columnNames;
if (getThumbs)
{
columnType = MediaStore.Images.Thumbnails._ID;
contentType = MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI;
}
else
{
columnType = MediaStore.Images.Media._ID;
contentType = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
}
columnNames = new String[]{columnType};
Cursor cursor = managedQuery(contentType, columnNames, null, null, null);
int columnIndex = cursor.getColumnIndexOrThrow(columnType);
for(int i = 0; i < cursor.getCount(); i++)
{
cursor.moveToPosition(i);
int id = cursor.getInt(columnIndex);
images.add(Uri.withAppendedPath(contentType, "" + id));
}
return images;
}
It returns the Uri of all the images or the Uri of the thumbnail of all the images on the sdcard.