Android-music database-1

Source: Internet
Author: User

 

Com. Android. providers. Media/databases under data/is divided into two parts:

  • External-cfe1d0f.db // external data mainly from SD
    In card
    Data
  • Internal. DB // mainly system data, such as system ringtones

 

 

Among them, the table above is related to music, and the table behind vdiao is also related to gallery. Today, my research is about music.

Album_art audio streams <br/> album_info audio images <br/> albums audio_genres thumbnails <br/> android_metadata Audio Video <br/> artist_info audio_meta <br/> artistsLet's clarify these relationships! The main column names of audio_meta table // contains meta data about audio files are as follows: _ id _ DATA _ display_name _ SIZE mime_type date_added date_modified title title_key duration
  • _ DATA:/sdcard/when your see.mp3 is the path
  • Mime_type: Audio/MPEG: Format

The following are SQL statements

Db.exe csql ("create table if not exists audio_meta (" + <br/> "_ id integer primary key," + <br/> "_ Data Text not null, "+ <br/>" _ display_name text, "+ <br/>" _ SIZE integer, "+ <br/>" mime_type text, "+ <br/>" date_added integer, "+ <br/>" date_modified integer, "+ <br/>" title text not null, "+ <br/>" title_key text not null, "+ <br/>" Duration integer, "+ <br/>" artist_id integer, "+ <br/>" compos Er text, "+ <br/>" album_id integer, "+ <br/>" track integer, "+ // track is an integer to allow proper sorting <br/>" year integer check (year! = 0), "+ <br/>" is_ringtone integer, "+ <br/>" is_music integer, "+ <br/>" is_alarm integer, "+ <br/>" is_notification integer "+ <br/> ");"); 

 

The source code is framework. Base. Core. java. Android. provider. mediastore. java.

The doc in the SDK is:

Public static interface

Public static interface <br/> mediastore. mediacolumns (its subclass below) implements basecolumns <br/> mediastore. audio. audiocolumnscolumns for audio file that show up in multiple tables. <br/> mediastore. audio. genres. memberssub-directory of each genre containing all members. <br/> mediastore. audio. media <br/> mediastore. audio. playlists. memberssub-directory of each playlist containing all members. <br/> mediastore. images. imagecolumns <br/> mediastore. images. media <br/> mediastore. video. media <br/> mediastore. video. videocolumns <br/> defines the following fields: <br/> stringdata_data <br/> stringdate_addeddate_added <br/> comment <br/> stringdisplay_name_display_name <br/> comment <br/> stringsizesize <br/> stringtitletitle <br/> inherit basecolumns --> so there are two downlink attributes <br/> string _ id <br/> string _ count 

 

The physical location of data storage is as follows:

Internal:/system/Media

External:/sdcard

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.