startActivity(意向),并重新开始主要活动?意向、startActivity

由网友(屌丝飞车党)分享简介:我有一个应用程序,创建一个意图的last.fm Android应用程序中,它会启动推荐站我的帐户时,我preSS的按钮。诀窍我试图找出是如何获得手机还给了我的应用程序,而无需导航回手动用户?一旦启动它带你到播放列表中的last.fm意图,我需要它自动恢复回我的应用程序。 I've got an app that cr...

我有一个应用程序,创建一个意图的last.fm Android应用程序中,它会启动推荐站我的帐户时,我preSS的按钮。诀窍我试图找出是如何获得手机还给了我的应用程序,而无需导航回手动用户?一旦启动它带你到播放列表中的last.fm意图,我需要它自动恢复回我的应用程序。

I've got an app that creates an intent for the last.fm android app in which it will start the "recommended" station for my account when i press a button. The trick i'm trying to figure out is how do i get the phone back to my app without the user having to navigate back manually? Once it start the last.fm intent it takes you to the playlist and i need it to resume back to my app automatically.

推荐答案

如果你使用startActivity(意向),你不能。另外,您也可以使用startActivityForResult(意向,INT),然后停止子活动与finishActivity(INT申请code)。

If you use startActivity(intent), you cannot. Alternatively, you can use startActivityForResult(Intent, int) and then stop the child activity with finishActivity(int requestCode).

阅读全文

相关推荐

最新文章