问题
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.
回答1:
If you use startActivity(intent), you cannot. Alternatively, you can use startActivityForResult(Intent, int) and then stop the child activity with finishActivity(int requestCode).
回答2:
Call Activity.finish() whenever you want close the present Activity and get back to an earlier one.
来源:https://stackoverflow.com/questions/3163928/startactivityintent-and-resume-to-main-activity