从Android的另一个应用程序启动应用程序 [英] Launch an application from another application on Android

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

问题描述

我想从我的Andr​​oid应用程序启动一个安装包。我认为这是可能的使用意图,但我没有发现这样做的一种方式。是否有一个链接,在哪里可以找到这些信息?

I want to launch an installed package from my Android application. I assume that it is possible using intents, but I didn't find a way of doing it. Is there a link, where to find the information?

推荐答案

如果您不知道的主要活动,那么包名可以用来启动应用程序。

If you don't know the main activity, then the package name can be used to launch the application.

Intent launchIntent = getPackageManager().getLaunchIntentForPackage("com.package.address");
startActivity(launchIntent);

这篇关于从Android的另一个应用程序启动应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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