【发布时间】:2010-04-28 10:06:44
【问题描述】:
我想从另一个应用程序调用一个 android 应用程序
我尝试了一些examples,但它们对我不起作用,我收到了包解析错误。
考虑有两个应用程序:Application1 和 Application2
我想从 Application1 调用 Application2
以下是一些示例代码:
Intent i = new Intent();
i.setAction(android.content.Intent.ACTION_VIEW);
i.setDataAndType(Uri.fromFile(fileName),"application/vnd.android.package-archive");
startActivity(i);
这里fileName = "file://data/data/package_name/files/Application1.apk";
【问题讨论】:
-
Android 中有许多类似于“从另一个调用一个 android 应用程序”的概念。请考虑在您的问题中再添加一百字左右,解释您要完成的工作,以便我们更好地帮助您。
标签: android