I suspect that launchApp isn't like calling a subroutine; it closes your app before running the requested app. When the requested app closes, yours is restarted (from scratch).
You might be able to simulate the effect you want by storing some state info in the file system prior to calling launchApp. Whenever your app starts, read that info and respond accordingly.
Best Answer