Registering the Provider

Finally, you must register the content provider in the Android.Manifest.xml file using this tag structure:

<provider android:name="BooksProvider"

android:authorities=" com.androidbook.provider.BookProvider "/>

This concludes our discussion about content providers. In this section, you learned the nature of content URIs and MIME types, and how to use SQLite to construct your own providers that respond to URIs. Once your underlying data is exposed in this manner, any application on the Android Platform can take advantage of it. This ability to access and update data using URIs, irrespective of the process boundaries, falls right in step with the current service-centric, cloud-computing landscape that we described in Chapter 1. In the next section, we will cover intents.

0 0

Post a comment