A ContentProvider is a generic mechanism for an application to provide access to data. This is done by subclassing ContentProvider, implementing certain methods, and publishing information in the manifest.

To access data provided by ContentProvider(s), you use ContentResolver. There is no need to subclass.

http://developer.android.com/guide/topics/providers/content-providers.html

This mechanism is used in certain Google applications.

Some of those, but not all, are considered to be part of the SDK, and can be used by other applications as well:

http://developer.android.com/reference/android/provider/package-summary.html

Some others are internal, and should not be used by other applications.

These internal providers can change at any time: with a new Android release, a new version of a Google application, or even when Android is customized by a device manufacturer.

These include Calendar and GMail, and perhaps more. It's not a good idea to use them in your application.

If you do, and make it work somehow, be aware that your code can break at any time.

-- Kostya

28.11.2010 11:37, adithya пишет:
Hi all,

I couldn't understand clearly the relation between ContentProvider and
ContentResolver classes provided by android.It says ContentProvider is
an interface for most of the activities to be carried out and it can
be done through ContentResolver ! (like reading/writing
messages,contacts,etc)

I would like to know what exactly is the relation between them ? The
documents also mention that using the provider classes are risky and
the risk comes when one uses it without its knowledge.

Can anyone please elaborate ?

-Adithya



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to