A, MediaProvider database description
1. Relational Databases
Physical relationship is a two-dimensional representation of the model table consists of rows and columns.
2. MediaProvider database storage location
/data/data/com.android.providers.media/databases
Built-in storage: internal.db
External Storage: external-ffffffff.db
3. MediaProvider scan to update the database
app层:MediaScannerReceiver、MediaScannerService
Framework层:MidiaScanner
Native层:StagefrightMediaScanner、MediaScannerClient
4. The difference between the tables and views
TABLE (table): the actual data storage, the physical space occupied by
View (view): virtual table, does not occupy physical space, but logical concept
Second, the external storage configuration platform
Based analog memory, physical storage supplemented
1. emulated primary
The exposed portion of internal storage and external storage implemented emulation layer, and marked as the main storage, the root directory mount point: / storage / emulated /
2. physical secondary
The SD card, USB devices such as a portable memory labeled secondary storage mount point root directory: / storage / (T card ID) /
Such as: / storage / 3066-1412 / 3066-1412 is the identification of the SD card, SD card identifies each is unique
Third, the application of MediaProvider in Music
1. Music application operation of the database were two kinds: query, delete
2. URI
Uri can represent all tables in the database; one table; or one of a list of an ID. image / audio on Androd device / video / file data and other resources are exist in the database table,
Therefore, we can say: available on Android each resource (images, video, etc.) can be used to represent Uri.
Fourth, the application of MediaProvider in SoundRecorder
SoundRecorder application operation of the database a total of three kinds: query, delete, insert, rename
五、AIDL(Android Interface definition language)
AIDL an Android, IPC (Inter-Process Communication). FIG.
AIDL role is so that you can bind other APP is a service in their own APP, the APP so you can interact with other APP.