Android会自动扫描外存(SD卡)中的文件,获取到audio类型的文件,分析文件后,将信息数据存储在 MediaStore.Audio.AudioColumns表内,该表的结构如下:

字段包括如下:

Constants
String ALBUM The album the audio file is from, if any

Type: TEXT

String ALBUM_ID The id of the album the audio file is from, if any

Type: INTEGER (long)

String ALBUM_KEY A non human readable key calculated from the ALBUM, used for searching, sorting and grouping

Type: TEXT

String ARTIST The artist who created the audio file, if any

Type: TEXT

String ARTIST_ID The id of the artist who created the audio file, if any

Type: INTEGER (long)

String ARTIST_KEY A non human readable key calculated from the ARTIST, used for searching, sorting and grouping

Type: TEXT

String BOOKMARK The position, in ms, playback was at when playback for this file was last stopped.
String COMPOSER The composer of the audio file, if any

Type: TEXT

String DURATION The duration of the audio file, in ms

Type: INTEGER (long)

String IS_ALARM Non-zero if the audio file may be an alarm

Type: INTEGER (boolean)

String IS_MUSIC Non-zero if the audio file is music

Type: INTEGER (boolean)

String IS_NOTIFICATION Non-zero if the audio file may be a notification sound

Type: INTEGER (boolean)

String IS_PODCAST Non-zero if the audio file is a podcast

Type: INTEGER (boolean)

String IS_RINGTONE Non-zero if the audio file may be a ringtone

Type: INTEGER (boolean)

String TITLE_KEY A non human readable key calculated from the TITLE, used for searching, sorting and grouping

Type: TEXT

String TRACK The track number of this song on the album, if any.
String YEAR The year the audio file was recorded, if any

Type: INTEGER

[Collapse] Inherited Constants
From interfaceandroid.provider.BaseColumns
String _COUNT The count of rows in a directory.
String _ID The unique ID for a row.
From interfaceandroid.provider.MediaStore.MediaColumns
String DATA The data stream for the file

Type: DATA STREAM

String DATE_ADDED The time the file was added to the media provider Units are seconds since 1970.
String DATE_MODIFIED The time the file was last modified Units are seconds since 1970.
String DISPLAY_NAME The display name of the file

Type: TEXT

String MIME_TYPE The MIME type of the file

Type: TEXT

String SIZE The size of the file in bytes

Type: INTEGER (long)

String TITLE The title of the content

Type: TEXT



类MediaStore.Audio.Media

描述了手机内和SD卡Audio文件的URI
Fields
public static final Uri EXTERNAL_CONTENT_URI The content:// style URI for the "primary" external storage volume.
public static final Uri INTERNAL_CONTENT_URI The content:// style URI for the internal storage.


更多相关文章

  1. Android 10 创建文件失败
  2. Android_判断文件是否存在并创建代码
  3. Android 项目打包成apk文件
  4. Android从远程服务器下载文件到本地sd卡中
  5. Android文件访问权限问题
  6. Android jni调用第三方so库和.h文件
  7. android studio的Gradle一直在sync的办法,不停的下载各种文件

随机推荐

  1. 使用Adb shell command直接送key event給
  2. ubuntu12.04 编译 ics android 4.0.4 日
  3. 【Android UI】自定义圆形Loading动画
  4. Android 判断是否是手机或平板。
  5. android 调用mail程序发送邮件
  6. Android Studio集成Library时报错,终极解
  7. 启动系统Camera拍照(Android)
  8. Android小程序之个人信息管理系统
  9. 说说在 Android 的 RecyclerView 中如何
  10. android屏幕休眠和唤醒两种方法(newWakeLo