Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/224.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android如何隐藏意向发送者包?_Android - Fatal编程技术网

Android如何隐藏意向发送者包?

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#

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#URI_ANDROID_APP_方案
referer URI,其中包含启动Intent的包名。如果无法识别引用者,则可能返回null——它既没有显式指定,也不知道涉及哪个应用程序包

因此,您可以在发送的意图中添加
Intent.EXTRA\u referer
,以覆盖默认值


裁判