【问题标题】:Android blocking intentAndroid 阻止意图
【发布时间】:2013-12-25 13:15:40
【问题描述】:

我的应用程序可以阻止来自其他应用程序的意图吗? 我想阻止来自特定应用程序的请求,

怎么做? 我可以访问 AOSP,所以我想了解我可以在代码中的哪个位置添加阻塞机制?

例如,我想拒绝与指定应用程序共享来自浏览器的内容(例如 URL 的副本)。

我看到意图转到活动管理器,活动管理器将其传递给相关应用程序, 我如何在底层知道请求的来源是什么?

例如: am start -a android.intent.action.SEND -d "some message" -t text/plain 我在外壳中看到: 开始: Intent { act=android.intent.action.SEND dat=some message typ=text/plain } I/ActivityManager(309):从 pid 1149 开始 u0 {act=android.intent.action.SEND dat=some message typ=text/plain flg=0x10000000 cmp=android/com.android.internal.app.ResolverActivity}

如何在较低层中知道源进程是 1149?我在活页夹中看到请求来自活动管理器 309,我想阻止进程 1149 我可以更改 AOSP,但我不知道在哪里可以更改。

【问题讨论】:

标签: android android-intent ipc android-binder


【解决方案1】:

您可以使用权限来执行此操作。请参阅thisthis

【讨论】:

    猜你喜欢
    • 2014-11-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-12-02
    相关资源
    最近更新 更多