Opening native apps using Appcelerator Titanium

Ever needed to open a native app from your Appcelerator Titanium project? Read below for a simple method I put together. The below method works for Android and iOS.