如何启动从另一个应用程序的Andr​​oid应用 [英] How to launch android applications from another application

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

问题描述

我要启动现有的Andr​​oid应用程序中的任何一个(联系人,电话拨号器等) 从我的应用程序后,在点击一个按钮。

I want to launch any one of the existing android applications (contacts, call dialer, etc.) from my app upon on click of a button.

所有我知道的是,以获得特定的应用程序的意图,并开始活动。但我不知道如何设置的类路径的意图联系人。

All that I know is to get the Intent of the particular app and start the activity. But I don't know how to set the class path for the intent for contacts.

我是否按照正确的解决方案吗?什么是启动其他应用程序的方式?

Am I following the correct solution? What is the way to launch another application?

推荐答案

您真的不调用其他应用程序 - 你生成的意图,然后等待有人把它捡起来。你指的是联系人的应用程序的URL为类路径?如果是的话这里的<一个href="http://developer.android.com/reference/android/provider/Contacts.Intents.html">Contacts.Intents辅助类参考的,你可以用它来创建联系人意图

You don't really call another application - you generate the intent and then wait for someone to pick it up. Are you referring to Contact's app URL as "class path"? If so here's Contacts.Intents helper class reference that you can use to create Contacts intents

下面是一个简单的例子:

Here's a short example:

Intent intent = new Intent();
intent.setAction(Contacts.Intents.SHOW_OR_CREATE_CONTACT);

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

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