Updated template with fully working Android code.