我正在编写这个 Android 应用程序,我正在使用 CometChat 库向我的应用程序添加聊天功能。 当我使用最新或最旧的版本执行此操作时,我获得了自动添加到我的 android manifest.xml 文件中的权限 => QUERY_ALL_PACKAGES 我与 Cometchat 支持 2.1.2-beta8 进行了交谈,所以我更改了 android调用sdk的版本 实现 'com.cometchat:pro-android-calls-sdk:2.1.2-beta8' 和 grep -r QUERY_ALL_PACKAGES * 什么都不返回。 但是当我打包我的应用程序并将其发送到 Play 商店时,我仍然遇到该错误 https://support.google.com/googleplay/android-developer/answer/10158779?hl=en-GB
我能看到的唯一罪魁祸首是 comet chat ui kit Kotlin 中的 MediaUtils.kt
调用 queryIntentActivities 的地方可能会产生该问题 -> https://github.com/cometchat-pro/android-kotlin-chat-ui-kit/blob/v3/uikit-kotlin/src/main/java/com/cometchat/pro/uikit/ui_resources/utils/MediaUtils.kt
我该怎么办? 根据 https://developer.android.com/training/package-visibility
我应该添加一些看起来像那样的东西
<queries>
<intent>
<action android:name="android.support.customtabs.action.CustomTabsService" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
</intent>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
<intent>
<action android:name="android.intent.action.GET_CONTENT" />
</intent>
</queries>
最佳答案
感谢 Cometchat 的支持,该问题的解决方案是将该库放入该特定版本 实现 'com.cometchat:pro-android-calls-sdk:2.1.2-beta8'
它将从权限中删除 QUERY_ALL_PACKAGES。 另一个版本神奇地将该权限添加到最终 list 中。我的代码库中没有其他代码添加该权限。
关于android - 来自 Play 商店的 QUERY_ALL_PACKAGES 警告,即使该权限没有出现在 AndroidManifest.xml 合并文件中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72414723/