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