How many content providers can we implement in one application?

I read the Android dev manual and notice that we can implement different classes for the content provider. So,

  • Does one Android app have multiple content providers or just one content provider?
  • How to implement different classes of content provider?

Here is what I read from the developer guide:

You are implementing a provider as one or more classes in an Android application

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

+3
source share
4 answers

, , . , <provider> Android.

. , . , , , 2 + .

+5

(, ) - , . , URI .

, ( ), - . URI , - -.

+1

, . , .

, , , .

But having too many content providers can really confuse you and is not required. The only scenario I see for multiple content providers is that you have several databases in your application and you want to share all these databases with external applications. Where you can use a separate content provider for each database to share it with the outside world.

Hope this helps.

+1
source

All Articles