How to handle gestures is aptly described here here.
You need save and record the gesture in a file. After you save the gesture then you can copy the saved gesture file to your /res/raw folder, load it, and attach a gesture listener as explained in above answer.
And method to launch another application is explained here
solved Are there any good Android tutorials for launching applications?