Overview
The 1.android contains 5 of data storage methods:
Sharedpreferences stores data.
ContentProvider Storage
File storage
Sqllite Database Storage
Networked storage
Preference File DataBase These three ways correspond to the directory is:
/data/data/package Name/shared_pref
/data/data/package Name/files
/data/data/package Name/database
Simple data and configuration information, sharedpreference is preferred;
If Sharedpreferences is not enough, create a database;
Structured data, be sure to create a database, although this slightly annoying lock, but the benefits are endless;
Files are used to store files (that is, non-configuration information or structured data), such as text files, binaries, PC files,
multimedia files, downloaded files and so on;
Try not to create files;
If a file is created, if it is a private file or an important file, it is stored on-premises, otherwise it is stored in an external storage