【发布时间】:2016-01-13 09:47:05
【问题描述】:
我在帖子里看到How to open an application inside another application within the latters boundaries in android?
但是当我尝试使用自定义 URL 方案打开另一个应用程序时,我的应用程序正在发生这种情况。有谁知道为什么会发生这种情况?
调用其他应用的代码如下。
String callBackUrl = “OtherApp://result?params”; // This is supposed to be a callback URL with query parameters
String redirectUrl = callBackUrl.substring(0, callBackUrl.indexOf("://"));
Intent redirectIntent = new Intent();
redirectIntent.putExtra(Intent.EXTRA_TEXT, callBackUrl);
redirectIntent.setAction(redirectUrl);
redirectIntent.setType("text/plain");
startActivity(redirectIntent);
【问题讨论】:
标签: android callback intentfilter url-scheme custom-url