Android has a gesture recognition API in 2.2, implemented by one of the creators of the $1 recognition algorithm (the one implemented in the article).
The creators of 'one-dollar' released the next generation of the algorithm, the $N multistroke algorithm, and here's an implementation of it in javascript: http://depts.washington.edu/aimgroup/proj/dollar/ndollar.htm...