Getting INSTALL_FAILED_CONFLICTING_PROVIDER when using the library. Can ContentProvider register dynamically?

Possible duplicate:
Content Provider INSTALL_FAILED_CONFLICTING_PROVIDER (setting the content provider as a separate apk)

Problem:

We have a library that uses ContentProvider. Therefore, it has appropriate methods to use and create ContentProvider. When we create application A with this ContentProviderdeclared for authority, everything works well.

The second application that intends to use the same one ContentProvider, after that, cannot be installed without throwing an error INSTALL_FAILED_CONFLICTING_PROVIDER. The only option is to declare a ContentProvidernew Administrator, which is not what we want (since the requirement is to use any existing ContentProviderone already defined for this Authority).

Is it possible to:

1) Register the program code ContentProvider(i.e. if it ContentResolver.acquireContentProviderClientreturns null, can it ContentProviderbe registered in the application?)

OR

2) Indicate in the manifest that ContentProvideryou need to register only if the required authority does not exist yet?

+5
source share

All Articles