顯示包含「SQLiteOpenHelper」標籤的文章。顯示所有文章
顯示包含「SQLiteOpenHelper」標籤的文章。顯示所有文章

2015-05-17

[Android] 範例: 使用SQLiteOpenHelper以及UriMatcher的ContentProvider. A simple example of ContentProvider which uses SQLiteOpenHelper and UriMatcher

This is a simple example of ContentProvider which uses SQLiteOpenHelper to create a database.


1.  Define a Database Contract.
It contains the following information about a Database.
(1) Authority
(2) Table names
(3) column names of each Table
(4) content Uri