Resolving ContentProvider URLs
An Android ContentProvider uses URLs to identify data. Typically, you can use a URL to identify a specific piece of data, such as a single reminder, or all reminders in your database. If you store other types of data there, you can use URLs for them, too.
In your application, you use two kinds of URLs — content://com.dummies.android.taskreminder.ReminderProvider/reminder to retrieve a list of all reminders in your database or content://com.dummies.android.taskreminder.ReminderProvider/reminder/9 to retrieve a specific reminder from the database (in this case the reminder with the ID of 9).
These content provider URLs are undoubtedly similar to the URLs you’re already familiar with. Their main differences are described in this list:
content://: A ContentProvider begins with content:// rather than with http://.
com.dummies.android.taskreminder.ReminderProvider: The second part of the URL identifies the authority (the ReminderProvider ContentProvider) of the content. Though this string can be virtually anything, convention dictates using the fully qualified name of your ContentProvider.
reminder: The third part of the URL identifies the path — in this case, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access