Registering Your Provider

Once you have completed your Content Provider, it must be added to the application manifest.

Use the authorities tag to specify its base URI, as shown in the following XML snippet.

<provider android:name="MyProvider"

android:authorities="com.paad.provider.myapp"/>

USING CONTENT PROVIDERS

The following sections introduce the ContentResolver class, and how to use it to query and transact with a Content Provider.

Mobile Apps Made Easy

Mobile Apps Made Easy

Quick start guide to skyrocket your offline and online business success with mobile apps. If you know anything about mobile devices, you’ve probably heard that famous phrase coined by one of the mobile device’s most prolific creators proclaiming that there’s an app for pretty much everything.

Get My Free Training Guide


Post a comment