【问题标题】:How can an app handle intents without having any intent-filters in its manifest?应用程序如何在其清单中没有任何意图过滤器的情况下处理意图?
【发布时间】:2020-05-31 22:13:14
【问题描述】:

我的理解是,为了处理外部意图,应用程序的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

我错过了什么?

【问题讨论】:

    标签: android android-intent android-manifest intentfilter


    【解决方案1】:

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

    <application hasCode="false">
    

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

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

    【讨论】:

    • 谢谢。你知道我如何找到另一个 APK(如果它存在的话)吗?第三方应用 APK Analyzer 未列出。
    • 不,抱歉。我没有。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-18
    • 2020-07-25
    • 1970-01-01
    相关资源
    最近更新 更多