Android 11软件包可见性过滤:在< Queries> gt; gt; gt; gt; gt; gt; gt; gt; gt; gt; gt; gt; gt; gt; gt; gt; gt;什么是什么最佳方法是什么。 30+软件包名称

发布于 2025-01-22 03:33:43 字数 618 浏览 5 评论 0原文

我有一种情况,我阅读来自不同内容提供商的数据(大约30个应用程序) 在代码中,我做类似的事情,

Uri contentUri = Uri.parse("content://"+packageName+"/tokens");
ContentProviderClient contentProvider = contentResolver.acquireContentProviderClient(contentUri);

这里的PackageName可以是任何包含与要求它相同的键签名的软件包名称。 现在,使用Android 11,我无法查询所有包装。

有一种方法可以实现此目的,即在< Queries>下添加软件包名称,但是添加30多个软件包名称似乎是不可能的,并且当它超过40之上时很难维护。 我不知道我们是否可以做这样的事情,

<queries>
    <package android:name="com.example.*"/>
</queries>

因此,我想知道一种更好的方法来查询所有使用相同键(签名)签名的软件包。 请注意:所有软件包名称均以com.org。

I have a situation where I read data from different content providers (approximately~30 apps)
In code, I do something like this,

Uri contentUri = Uri.parse("content://"+packageName+"/tokens");
ContentProviderClient contentProvider = contentResolver.acquireContentProviderClient(contentUri);

Here packageName can be any package name signed with the same key as the one requesting it.
Now, with Android 11, I cannot query all the packages.

There is one way to achieve this which is to add package names under <queries> but adding 30+ package names seems impossible and it is hard to maintain when it goes above 40 or something.
I don't know if we can do something like this,

<queries>
    <package android:name="com.example.*"/>
</queries>

So, I want to know a better way to query all the packages signed with the same key (signature).
Please note: All the package names start with com.org.<app_name>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文