从另一个应用程序启动一个Android应用程序 [英] Starting One Android App from Another App

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

问题描述

什么是从另一个应用程序启动一台Android应用程序的最佳方法是什么?它是发送自定义播放事件,并已播出的其他应用程序接收器捕获此事件,并做一个启动活动上的东西吗?谢谢

What is the best way to start one android app from another app? Is it to send custom broadcast event and have broadcast receiver of other app catch this event and do a start activity on something? Thanks

推荐答案

使用一个意图:的 http://developer.android.com/guide/topics/intents/intents-filters.html

使用Context.startActivity()刚刚推出,或者如果你想要得到的结果,当它完成Activity.startActivityForResult()。

Use Context.startActivity() to just launch, or Activity.startActivityForResult() if you want to get a result when it's done.

如果您是紧耦合与其他应用程序,你可以使用一个明确的意向。否则,发送一个隐含的意图。

If you are tightly coupled with the other application, you can use an explicit Intent. Otherwise, send an implicit Intent.

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

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