Android如何隐藏意向发送者包?
App package name A,send intent with action action\u VIEW and url data to system,App B get it and open,但我只想要B open intent,不想要App B get App A的package name,怎么做?找到发送意图的包的唯一方法似乎是via(取自)。在其文件中,明确说明了以下内容: 返回有关发起此活动的人员的信息。如果发射意图包含,将按原样返回;否则,如果已知,将返回一个Android如何隐藏意向发送者包?,android,Android,App package name A,send intent with action action\u VIEW and url data to system,App B get it and open,但我只想要B open intent,不想要App B get App A的package name,怎么做?找到发送意图的包的唯一方法似乎是via(取自)。在其文件中,明确说明了以下内容: 返回有关发起此活动的人员的信息。如果发射意图包含,将按原样返回;否则,如果已知,将返回一个Intent#
Intent#URI_ANDROID_APP_方案
referer URI,其中包含启动Intent的包名。如果无法识别引用者,则可能返回null——它既没有显式指定,也不知道涉及哪个应用程序包
因此,您可以在发送的意图中添加Intent.EXTRA\u referer
,以覆盖默认值
裁判