The returnTarget() function
The returnTarget() function is called after a process is completed or to abnormally terminate a process. Gadgets can optionally define a state loop which augments public states. When this loop is completed the return target function is called to return the user back to the activity that they were doing when they initiated the state loop.