The content provider is an interface that stores data in a structured format. Before creating an interface, you must decide how to save the data. You can store the data in any format you like, and then design the interface necessary for reading and writing data.
The following are effective data storage technologies on the Android platform:
1. The Android system includes an android SQLite database API used to save table-oriented data. The sqliteopenhelper class helps you create databases. The sqlitedatabase class is the base class for accessing databases. Remember, you do not have to use a database to implement your resource library. The provider uses a set of tables similar to relational databases as external representations, but the internal implementation of the provider is not necessary.
2. Android provides various file-oriented APIs for saving file data. To learn more about file storage, read the "Data Storage" topic. If you are designing a provider that provides music, video, and other multimedia data, you can combine data tables and files;
3. for network-based data, use classes in java.net and android.net. You can also synchronize network-based data to local storage, such as a local database, and then provide data in the form of tables or files. Sample sync adapter Sample ApplicationProgramDemonstrate the synchronization type.
ExampleCodeLocation: http://developer.android.com/resources/samples/SampleSyncAdapter/index.html