版权声明:本文为博主原创文章,未经博主允许不得转载 https://blog.csdn.net/hnlgzb/article/details/88595175
ContentResolver cr = MainActivity.this.getContentResolver();
Cursor cursor = cr.query(
MediaStore.Files.getContentUri("external"), null, null,
null, "date_modified DESC");
cursor.moveToFirst();
String[] strings= cursor.getColumnNames();
Log.i("YYY","Column size--:"+strings.length);
for (String s:strings){
int t= cursor.getType(cursor.getColumnIndex(s));
Log.i("YYY","--:"+s+"--:"+t);
03-16 11:53:00.561 29377 29533 I YYY : Column size--:48
03-16 11:53:00.561 29377 29533 I YYY : --:_id--:1
03-16 11:53:00.561 29377 29533 I YYY : --:_data--:3
03-16 11:53:00.561 29377 29533 I YYY : --:_size--:1
03-16 11:53:00.561 29377 29533 I YYY : --:format--:1
03-16 11:53:00.561 29377 29533 I YYY : --:parent--:1
03-16 11:53:00.562 29377 29533 I YYY : --:date_added--:1
03-16 11:53:00.562 29377 29533 I YYY : --:date_modified--:1
03-16 11:53:00.562 29377 29533 I YYY : --:mime_type--:3
03-16 11:53:00.562 29377 29533 I YYY : --:title--:3
03-16 11:53:00.562 29377 29533 I YYY : --:description--:0
03-16 11:53:00.562 29377 29533 I YYY : --:_display_name--:3
03-16 11:53:00.562 29377 29533 I YYY : --:picasa_id--:0
03-16 11:53:00.562 29377 29533 I YYY : --:orientation--:0
03-16 11:53:00.562 29377 29533 I YYY : --:latitude--:0
03-16 11:53:00.562 29377 29533 I YYY : --:longitude--:0
03-16 11:53:00.562 29377 29533 I YYY : --:datetaken--:1
03-16 11:53:00.562 29377 29533 I YYY : --:mini_thumb_magic--:0
03-16 11:53:00.562 29377 29533 I YYY : --:bucket_id--:3
03-16 11:53:00.562 29377 29533 I YYY : --:bucket_display_name--:3
03-16 11:53:00.562 29377 29533 I YYY : --:isprivate--:0
03-16 11:53:00.562 29377 29533 I YYY : --:title_key--:0
03-16 11:53:00.562 29377 29533 I YYY : --:artist_id--:0
03-16 11:53:00.562 29377 29533 I YYY : --:album_id--:0
03-16 11:53:00.562 29377 29533 I YYY : --:composer--:0
03-16 11:53:00.562 29377 29533 I YYY : --:track--:0
03-16 11:53:00.562 29377 29533 I YYY : --:year--:0
03-16 11:53:00.562 29377 29533 I YYY : --:is_ringtone--:0
03-16 11:53:00.562 29377 29533 I YYY : --:is_music--:0
03-16 11:53:00.562 29377 29533 I YYY : --:is_alarm--:0
03-16 11:53:00.563 29377 29533 I YYY : --:is_notification--:0
03-16 11:53:00.563 29377 29533 I YYY : --:is_podcast--:0
03-16 11:53:00.563 29377 29533 I YYY : --:album_artist--:0
03-16 11:53:00.563 29377 29533 I YYY : --:duration--:0
03-16 11:53:00.563 29377 29533 I YYY : --:bookmark--:0
03-16 11:53:00.563 29377 29533 I YYY : --:artist--:0
03-16 11:53:00.563 29377 29533 I YYY : --:album--:0
03-16 11:53:00.563 29377 29533 I YYY : --:resolution--:0
03-16 11:53:00.563 29377 29533 I YYY : --:tags--:0
03-16 11:53:00.563 29377 29533 I YYY : --:category--:0
03-16 11:53:00.563 29377 29533 I YYY : --:language--:0
03-16 11:53:00.563 29377 29533 I YYY : --:mini_thumb_data--:0
03-16 11:53:00.563 29377 29533 I YYY : --:name--:0
03-16 11:53:00.563 29377 29533 I YYY : --:media_type--:1
03-16 11:53:00.563 29377 29533 I YYY : --:old_id--:0
03-16 11:53:00.563 29377 29533 I YYY : --:storage_id--:1
03-16 11:53:00.563 29377 29533 I YYY : --:is_drm--:0
03-16 11:53:00.564 29377 29533 I YYY : --:width--:1
03-16 11:53:00.564 29377 29533 I YYY : --:height--:1