如何启动从Android的另一个应用程序的应用程序? [英] How to launch an application from another application in android?

查看:178
本文介绍了如何启动从Android的另一个应用程序的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
  入手一部Android应用程序从其他应用

我们正在开发一个Android应用程序让说 com.example.helloone 和其他Android应用程序 com.test.hellocalled 。这里都是两个不同的包,我要打电话从 com.example.helloone com.test.hellocalled 应用>。可你建议有关一样吗?

We are developing an android application let say com.example.helloone and another android application com.test.hellocalled.Here both are two different packages,i want to call com.test.hellocalled application from com.example.helloone.Can you suggest regarding same?

推荐答案

在你的活动,你可以使用

In your activity, you can use

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的另一个应用程序的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆