从Android的另一个应用程序启动应用程序应用程序、Android

由网友(_____浅梦未央)分享简介:我想从我的Andr​​oid应用程序启动一个安装包。我认为这是可能的使用意图,但我没有发现这样做的一种方式。是否有一个链接,在哪里可以找到这些信息?I want to launch an installed package from my Android application. I assume that it i...

我想从我的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);
阅读全文

相关推荐

最新文章