【问题标题】:When will android broadcasts intent ACTION_PACKAGE_NEEDS_VERIFICATION?android什么时候会广播intent ACTION_PACKAGE_NEEDS_VERIFICATION?
【发布时间】:2016-05-20 17:17:18
【问题描述】:

关于 ACTION_PACKAGE_NEEDS_VERIFICATION 意图,android 文档说:

`当需要验证包时发送给系统包验证器。数据包含包 URI。

这是一个受保护的意图,只能由系统发送。` 发现于https://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_NEEDS_VERIFICATION

但这意味着什么样的验证? android会在哪些场合或场景下广播这个intent?

【问题讨论】:

    标签: android android-intent android-broadcast android-broadcastreceiver


    【解决方案1】:

    查看recent source code(在第 10669 行附近),如果安装了任何包验证器,系统似乎会在安装新包期间广播此意图:

                /*
                 * Determine if we have any installed package verifiers. If we
                 * do, then we'll defer to them to verify the packages.
                 */
    

    关于包验证器是什么以及他们做什么的解释,我的理解是他们需要拥有 PACKAGE_VERIFICATION_AGENT 权限(保留给系统应用程序),这使他们能够响应accept or reject the installation of the new package的广播。 Google Play 商店应用是一种验证代理,似乎使用 Google 的在线应用验证服务来执行此功能。

    这是一个主题为 a lot of interesting information 的页面(如果您在线进行“android 软件包验证程序”搜索,则会出现其他几个页面)。

    【讨论】:

      猜你喜欢
      • 2018-04-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多