I have two applications which use the same content provider, but I can't put the same content provider in both applications- it shows INSTALL_FAILED_CONFLICTING_PROVIDER error. So I have put my content provider in a 3rd .apk and used this from two applications and it is working well.
Now the problem is- The content provider apk must be installed before any of those two apps can be installed on the device. Otherwise, it shows Provider not found error during installation.
So, how can I ensure that the provider apk is installed before any of the other apks is installed?
Is there a way to merge the content provider apk with both of the other apks separately, so they will be installed together as two applications and won't show INSTALL_FAILED_CONFLICTING_PROVIDER error?
I need to merge the content provider apk with both applications, because the user may not install both applications or may install them both on a single device.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…