ContentResolver is the one that will decide where the operations go. When you request an operation, the first parameter is a Uri that has an authority and a path in it. The Resolver matches the authority to a single ContentProver and then issues the calls to that provider
Android - Two ContentProviders which one does getContentResolver() retrieve?
-
12-06-2023 - |
Question
Lets say i have defined two contentProviders in the same Android Manifest and they both are contained in the same package.
When i call: context.getContentResolver()
Which ContentProvider will my CRUD operations flow to ?
Solution
OTHER TIPS
When you run a request on the ContentResolver, you pass in a URI. This is what determines what contentProvider gets called.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow