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

2023-09-12 10:25:52 作者:嫣然一笑

什么是从另一个应用程序启动一台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.