Книга: Beginning Android
Step #4: Update the Manifest
Step #4: Update the Manifest
The glue tying the content-provider implementation to the rest of your application resides in your AndroidManifest.xml
file. Simply add a provider element as a child of the <application>
element:
<provider
android:name=".Provider"
android:authorities="com.commonsware.android.tourit.Provider" />
The android:name
property is the name of the content-provider class, with a leading dot to indicate it is in the stock namespace for this application’s classes (just like you use with activities).
The android:authorities
property should be a semicolon-delimited list of the authority values supported by the content provider. Recall, from earlier in this chapter, that each content Uri
is made up of a scheme, an authority, a data type path, and an instance identifier. Each authority from each CONTENT_URI
value should be included in the android:authorities
list.
Now when Android encounters a content Uri
, it can sift through the providers registered through manifests to find a matching authority. That tells Android which application and class implements the content provider, and from there Android can bridge between the calling activity and the content provider being called.
- 4.4.4 The Dispatcher
- About the author
- Chapter 7. The state machine
- Appendix E. Other resources and links
- Example NAT machine in theory
- The final stage of our NAT machine
- Compiling the user-land applications
- The conntrack entries
- Untracked connections and the raw table
- Basics of the iptables command
- Other debugging tools
- Setting up user specified chains in the filter table