扫描两个时间之间的多媒体文件

How to query contentresolver between two dates?

Cursor cursor = getContentResolver().query( 
              MediaStore.Images.Media.EXTERNAL_CONTENT_URI, 
              projection, 
              MediaStore.MediaColumns.DATE_ADDED + ">=? and "+MediaStore.MediaColumns.DATE_ADDED +"<=?", 
              new String[]{"" + date1.getTtime()/1000,""+date2.getTime()/1000}, 
              MediaStore.Images.ImageColumns.DATE_TAKEN + " DESC");

你可能感兴趣的:(android,MediaStore)