首页 > 解决方案 > 应用程序如何在其清单中没有任何意图过滤器的情况下处理意图?

问题描述

我的理解是,为了处理外部意图,应用程序的manifest.xml文件必须包含一个intent-filter; 然而,使用 APK Analyzer,我看到 Spotify 应用程序的清单仅仅是:

<?xml version="1.0" encoding="UTF-8"?><manifest versionCode="55843262" configForSplit="" package="com.spotify.music" split="config.xxhdpi">
  <application hasCode="false">
    <meta-data name="com.android.vending.derived.apk.id" value="8"/>
  </application>
</manifest>

这显示没有意图过滤器;但是,我可以通过以下方式打开 Spotify:

adb shell am start -a "android.media.action.MEDIA_PLAY_FROM_SEARCH" -e android.intent.extra.focus "vnd.android.cursor.item/*" -e query Bowie

我错过了什么?

标签: androidandroid-intentandroid-manifestintentfilter

解决方案


该清单表明 APK 不包含任何代码:

<application hasCode="false">

要么有另一个包含代码的 APK(其中还包含您缺少的其余清单条目),要么 Spotify 正在使用 Google Play 动态交付,它允许动态下载和安装模块。

在任何情况下,您都没有查看应用程序的整个清单。


推荐阅读