可能重复:
Starting One Android App from Another App如何从android中的另一个应用程序启动应用程序?
我们正在开发一个Android应用程序让说com.example.helloone
和其他Android应用程序com.test.hellocalled
。这里都是两个不同的包,我想打电话从com.example.helloone
com.test.hellocalled
应用你可以提出一致吗?
可能重复:
Starting One Android App from Another App如何从android中的另一个应用程序启动应用程序?
我们正在开发一个Android应用程序让说com.example.helloone
和其他Android应用程序com.test.hellocalled
。这里都是两个不同的包,我想打电话从com.example.helloone
com.test.hellocalled
应用你可以提出一致吗?
我不确定如何标记重复的内容,但是快速的谷歌搜索会调出this question,这与您的相同。
要么ü可以用一个Intent类似于您要启动或U可以使用它的文件路径启动应用程序,如下所示的应用程序的一个启动活动:
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);
上下文。 startActivity(意向);
在您的活动,您可以使用
if(isAppInstalled("com.other.package"))
{
Intent nextIntent = new Intent(Intent.ACTION_MAIN);
nextIntent.setComponent(new ComponentName("com.other.package","com.other.package.Activity"));
startActivity(nextIntent);
}
对不起,我的意思是,一个应用程序启动其他android的应用程序。试过上述案件,但没有解决.. –
此问题已作为重复被关闭;如果您的实际问题不同,请再询问一次,但请务必清楚解释您的情况有何不同。 –
对于一个很好的答案+1。 – an00b
问了很多次。在发布新问题之前,请使用[搜索](http://stackoverflow.com/search?q=starting+another+app+from+my+app+in+Android)功能。 – Mudassir
那一个http://stackoverflow.com/questions/2728465/how-to-call-one-android-application-from-another-android-application是更老,更好 – Gangnus