Android: Launch app with shortcut, perform action, and exit?

view story

http://stackoverflow.com – I have an Android application that can perform certain actions. However, I also allow the creation of shortcuts on the homescreen to perform certain things. There is a certain thing you can do in the app by pressing a button in it which calls a method (lets call the method DoAction), that I want to allow users to do directly from a shortcut. When clicking the shortcut, it opens the main activity and calls DoAction just as the button does, and then calls finish() on the activity to close it. However, a problem arises when the app is already open in RAM (minimized). After calling finish() in th (HowTos)