Professional Documents
Culture Documents
● Overall structure
● Interaction with Content Provider
● Constructing query
● URI'S
● Provider permissions
● Creating Content Provider
● Questions
● Overall structure
● Interaction with Content Provider
● Constructing query
● URI'S
● Provider permissions
● Creating Content Provider
● Questions
Overall structure
Application #2
Application #1
Activity #1
Activity #1
Activity #3 Activity #1
Activity #2
Remote
Database Files XML …
connection
Content Provider is a source
Application #2
Application #1
Activity #1
Activity #1
Activity #3 Activity #1
Activity #2
Remote
Database Files XML …
connection
For some consumers
Application #2
Application #1
Activity #1
Activity #1
Activity #3 Activity #1
Activity #2
Remote
Database Files XML …
connection
Gives access to variety types of data
Application #2
Application #1
Activity #1
Activity #1
Activity #3 Activity #1
Activity #2
Remote
Database Files XML …
connection
Overall structure
Application #2
Application #1
Activity #1
Activity #1
Activity #3 Activity #1
Activity #2
Remote
Database Files XML …
connection
● Overall structure
● Interaction with Content Provider
● Constructing query
● URI'S
● Provider permissions
● Creating Content Provider
● Questions
Interaction with Content Provider
Application #2
Application #1
Activity #1
Activity #1
Activity #3 Activity #1
Activity #2
Remote
Database Files XML …
connection
Activity to Content Provider access
Activity
CursorAdapter ListView
Activity
Activity
CursorAdapter ListView
Performing request
Content Provider
Query
Insert
ContentResolver URI
Update
Delete
URI
content://com.example.provider/articles
if (mCursor != null) {
while (mCursor.moveToNext()) {
String title = mCursor.getString(Columns.TITLE);
}
}
● Overall structure
● Interaction with Content Provider
● Constructing query
● URI'S
● Provider permissions
● Creating Content Provider
● Questions
URI’S
CONTENT
URI
TYPE
contacts ContactsContract.Contacts.CONTENT_URI;
messages Uri uri = Uri.parse("content://sms/inbox");
audio MediaStore.Audio.Media.EXTERNAL_CONTENT_URI
video MediaStore.Video.Media.EXTERNAL_CONTENT_URI
images MediaStore.Images.Media.EXTERNAL_CONTENT_URI
call logs android.provider.CallLog.Calls.CONTENT_URI
android.provider.CalendarContracts.Calendar.CONTENT_
calendar
URI
settings android.provider.Settings.System.CONTENT_URI
dictionary android.provider.UserDictionary.Words.CONTENT_URI
Questions
Thank you!