F
F
FoxInSox2014-01-11 09:31:04
Android
FoxInSox, 2014-01-11 09:31:04

What is a Content Provider?

A recent article describes the architecture of an application that has a Content Provider definition:

The content provider is very powerful with data change notifications and it's all out of the box. We use it mainly as a wrapper over the base. I did not find a way how to correctly shove the download of data from the Internet.

The documentation is completely different:
Content providers are one of the primary building blocks of Android applications, providing content to applications. They encapsulate data and provide it to applications through the single ContentResolver interface. A content provider is only required if you need to share data between multiple applications.

Those. Apparently the author of the article meant another Content provider, or not?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Mintormo, 2014-01-11
@Mintormo

Correct in the documentation: a component that distributes data for several applications (although it can only be one, but the very idea of ​​\u200b\u200bthe component is to provide access to data for several applications). It's about the same thing. Android has only one Content Provider.

N
nonrblGyN4ik, 2014-01-11
@nonrblGyN4ik

No, it's just that the author of the article does not have the gift of a clear explanation :)

R
Rustem Saitkulov, 2015-11-02
@atetc

Content Provider - an entity that is an independent wrapper over data sources (the business logic of the application may not even know exactly how it is arranged: a database, files, a server, or something else), which also follows a REST-like architecture and seeks to bring data into a generalized type.
Briefly, you can find here habrahabr.ru/post/132720
PS this entity has many interesting features: for example, the documentation does not say that they were used to implement the classic A, B, C patterns by Virgil Dobjanschi (Google IO 2010 conference www.youtube.com/watch?v=xHXn3Kg2IQE ).
The topic is actually very extensive, it can't be covered in one paragraph, you need to study/practice. Content providers have not lost their relevance today, quite the contrary.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question