Zendesk Web Android SDK Bug Content Providers
답변함Greetings,
We've been trying to update Zendesk Web Android SDK version to 2.1.0 and faced an issue with content providers there. Our Android app has a few flavors (build variants) and with using Zendesk 2.1.0 we're not able to install more than 1 build variant (apk) at the same time on the device, because of `INSTALL_FAILED_CONFLICTING_PROVIDER` error during the installation.
This issue is caused by the conflict of Android's Content Providers - there is a rule, that their `authority` declared in the AndroidManifest (and later referenced in code) should be unique per the application. Thus, Android OS won't give users a chance to install applications with the content provider whose authority is not unique (only first would be installed, all others would fail), see the SO post about this: https://stackoverflow.com/questions/16267785/install-shows-error-in-console-install-failed-conflicting-provider
The issue with not unique authorities came into our apps from the Zendesk SDK. Take a look at Zendesk SDK AndroidManifest,
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.zendesk.native_messaging.fileprovider"
android:exported="false"
android:grantUriPermissions="true" >
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/files_path" />
</provider>
U can see there, that the authority for content provider is constant value. Usually, devs are using the manifest placeholders and placing there an "${applicationId}.myContentProvider" into authorities, so the value would be unique per the application.
Suddenly we cannot fix this issue on our own, because even if we would override the authority value by using manifest merger tags, that value is still referenced in the code:
AttachmentActivity (decompiled)
private static final String FILE_PROVIDE_AUTH = "com.zendesk.native_messaging.fileprovider";
Please, take a look there and make the authority value of content-provider dynamically depending on the `applicationId`. Or give devs a way to configure the authority value to which code is referenced, so we can override the authority value on our own in the AndroidManifest.
It's a blocker for us on updating the Zendesk SDK version, we're still using 1.1.0 because of this issue.
-
Hi Sergey,
Thanks for reaching out. Yes, we discovered this issue internally as well. It's been corrected and will be included in a new release in the upcoming days, apologies for this. Keep an eye on our release notes for the fix.
-
Hi Mick,
Thanks for letting know, would keep an eye on the release notes!
-
Hi Mick,
Do you have any updates with this issue? Because, we have the same problem in our apps.
-
Hey Jasur,
This issue was patched in the 2.2.0 release. Can you please make sure you're running the 2.2.0 release or later? If the issue is still present, let us know.
Thanks!
댓글을 남기려면 로그인하세요.
4 댓글