Shay, it sounds like to me from your queries, that you want to validate a license, and only proceed further into the program if the license validation passes. If this is the case, why not have the license validation activity as your main activity, thus having it called first, and then on successful validation start the main program activity? Then, you can do it like this:
If ValidationSuccessful = True Then StartActivity("program") 'my syntax may be off since I'm free typing
Activity.Finish 'kill THIS validation activity
This way, the main program activity will only get started upon successful validation, and whichever the case, the validation activity is released. If validation is not successful, the only open activity, the validation activity, will be closed thus closing the app. If successful, the program activity will start and the app will not close since it still has an open activity, the program activity.
Does this help?
Edit: I see someone else has the same thoughts as I. Thanks thedesolatesoul...