Creating a Content Provider

To create a content provider, you must:

• Set up a system for storing the data. Most content providers store their data using Android's file storage methods or SQLite databases, but you can store your data any way you want. Android provides the SQLiteOpenHelper class to help you create a database and SQLiteDatabase to manage it.

• Extend the ContentProvider class to provide access to the data.

• Declare the content provider in the manifest file for your application (AndroidManifest.xml). The following sections have notes on the last two of these tasks.

0 0

Post a comment