Reputation: 4250
Is this possible to use more than one ContentProvider?
If possible how to declare in manifest? I tried using following way but getContentResolver()
is getting only the first provider.
<provider
android:name=".bean.ItemBean"
android:authorities="com.waveletandroid.bean" >
</provider>
<provider
android:name=".bean.CustomerBean"
android:authorities="com.waveletandroid.bean" >
</provider>
Upvotes: 4
Views: 278
Reputation: 1006614
Is this possible to use more than one ContentProvider?
Yes. Or, you can have one ContentProvider
that provides multiple data sets, based upon the path portion of the Uri
or via different authorities.
If possible how to declare in manifest?
What you have is almost correct. They cannot both have the same authority, though. Change one to be something else (e.g., com.waveletandroid.bean2
).
Upvotes: 6