Possible Duplicate:
Content Provider INSTALL_FAILED_CONFLICTING_PROVIDER (installing content provider as a separate apk)
The Problem :
We have a library that uses a ContentProvider. It therefore has relevant methods to use and create the ContentProvider. When we build app A with this ContentProvider declared for an authority, all works well.
A second application that intends to use the same ContentProvider cannot be installed after this, without throwing the INSTALL_FAILED_CONFLICTING_PROVIDER error. The only option is to declare the ContentProvider with a new Authority, which is not what we want ( as the requirement is to use any existing ContentProvider already defined for that Authority).
Is it therefore possible to :
1) Register a ContentProvider programmatically (i.e. if ContentResolver.acquireContentProviderClient returns null, can a ContentProvider be registered in the app?)
OR
2) Specify in the manifest the ContentProvider needs to be registered only if the desired authority does not already exist?