Android how to add more than one ContentProvider in Android?
android, android-contentprovider, sqlite
Solution
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`).
Problem
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> ```