Android中關於Audio庫的知識

來源:互聯網
上載者:User

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.

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.