This is the code used in an android development class