【发布时间】:2017-10-06 12:42:15
【问题描述】:
我知道我可以使用 Intent 打开 Activity,但我正在尝试从我的应用程序中打开特定的 Activity。
Intent launchIntent = getPackageManager().getLaunchIntentForPackage("com.3rdPartyApplcation");
if (launchIntent != null)
{
startActivity(launchIntent);
}
示例:- 我的应用程序是 A 我必须打开应用程序 B 的 设置页面,它是 3rd 方应用程序,我也知道活动名称。
如何通过意图打开此设置页面
【问题讨论】:
-
solution stackoverflow.com/a/2210073/1872098 和第三方应用程序活动必须在清单中导出 = true
-
很可能,该活动未导出,因此您无法启动它。
-
java.lang.SecurityException: Permission Denial: starting Intent 我还添加了 android:exported="true"