可能重复:
Starting One Android App from Another App
我们正在开发一个安卓应用程序--比方说com.example.helloone和另一个安卓应用程序com.test.hellocalled.Here --都是两个不同的包,我想从com.example.helloone.Can调用com.test.hellocalled应用程序,您建议这样做吗?
发布于 2011-06-20 07:43:43
您可以以与您希望启动的应用程序类似的目的启动活动,也可以使用其文件路径启动应用程序,如下所示:
Intent intent=new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse("file:///sdcard/the full path to your file"), "application/vnd.android.package-archive"); "application/vnd.android.package-archive");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);Context.startActivity(意图);
https://stackoverflow.com/questions/6408062
复制相似问题